Relicense as dual Apache-2.0 + MIT
[rust-lightning] / fuzz / src / peer_crypt.rs
index e0ff02f04ccc341a219cc9a90bf308a349224591..f41137fc828b02c003110d34d4f91f4f84fd51d4 100644 (file)
@@ -1,6 +1,17 @@
+// This file is Copyright its original authors, visible in version control
+// history.
+//
+// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
+// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// You may not use this file except in accordance with one or both of these
+// licenses.
+
 use lightning::ln::peer_channel_encryptor::PeerChannelEncryptor;
 
-use secp256k1::key::{PublicKey,SecretKey};
+use bitcoin::secp256k1::key::{PublicKey,SecretKey};
+
+use utils::test_logger;
 
 #[inline]
 fn slice_to_be16(v: &[u8]) -> u16 {
@@ -75,6 +86,10 @@ pub fn do_test(data: &[u8]) {
        }
 }
 
+pub fn peer_crypt_test<Out: test_logger::Output>(data: &[u8], _out: Out) {
+       do_test(data);
+}
+
 #[no_mangle]
 pub extern "C" fn peer_crypt_run(data: *const u8, datalen: usize) {
        do_test(unsafe { std::slice::from_raw_parts(data, datalen) });