reimplemented existing test

This commit is contained in:
mamoniot 2022-12-14 18:34:25 -05:00
parent d3e0de0ad8
commit 194a12c180
2 changed files with 9 additions and 3 deletions

View file

@ -2,6 +2,7 @@
mod zssp;
mod app_layer;
mod ints;
mod tests;
pub mod constants;
pub use zssp::{Error, ReceiveResult, ReceiveContext, Session};

View file

@ -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
}