From 194a12c180399a9f181502f1db7bf8f22aed16b2 Mon Sep 17 00:00:00 2001 From: mamoniot Date: Wed, 14 Dec 2022 18:34:25 -0500 Subject: [PATCH] reimplemented existing test --- zssp/src/lib.rs | 1 + zssp/src/tests.rs | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/zssp/src/lib.rs b/zssp/src/lib.rs index ae8cf7664..cdef07c08 100644 --- a/zssp/src/lib.rs +++ b/zssp/src/lib.rs @@ -2,6 +2,7 @@ mod zssp; mod app_layer; mod ints; +mod tests; pub mod constants; pub use zssp::{Error, ReceiveResult, ReceiveContext, Session}; diff --git a/zssp/src/tests.rs b/zssp/src/tests.rs index 8903e29b9..610d0a7d4 100644 --- a/zssp/src/tests.rs +++ b/zssp/src/tests.rs @@ -3,10 +3,15 @@ mod tests { use std::collections::LinkedList; use std::sync::{Arc, Mutex}; + use zerotier_crypto::hash::SHA384; + use zerotier_crypto::p384::{P384KeyPair, P384PublicKey}; + use zerotier_crypto::random; + use zerotier_crypto::secret::Secret; use zerotier_utils::hex; #[allow(unused_imports)] - use super::*; + use crate::*; + use constants::*; struct TestHost { local_s: P384KeyPair, @@ -46,11 +51,11 @@ mod tests { const REKEY_RATE_LIMIT_MS: i64 = 0; - fn get_local_s_public_raw(&self) -> &[u8] { + fn get_local_s_public_blob(&self) -> &[u8] { self.local_s.public_key_bytes() } - fn get_local_s_public_hash(&self) -> &[u8; 48] { + fn get_local_s_public_blob_hash(&self) -> &[u8; 48] { &self.local_s_hash }