X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fpeer_crypt.rs;h=f41137fc828b02c003110d34d4f91f4f84fd51d4;hb=2ea3765b7aa7e029b163f19cdde62abb539f09cb;hp=8e61644644ec4a474f3e6c76184c0cd7a7f36967;hpb=be677dc4f44fb8ec793d9280fada8b9a0ea833f8;p=rust-lightning diff --git a/fuzz/src/peer_crypt.rs b/fuzz/src/peer_crypt.rs index 8e616446..f41137fc 100644 --- a/fuzz/src/peer_crypt.rs +++ b/fuzz/src/peer_crypt.rs @@ -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 or the MIT license +// , 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,15 +86,11 @@ pub fn do_test(data: &[u8]) { } } +pub fn peer_crypt_test(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) }); } - -#[cfg(test)] -mod tests { - #[test] - fn duplicate_crash() { - super::do_test(&::hex::decode("01").unwrap()); - } -}