diff --git a/zerotier-network-hypervisor/src/vl1/careof.rs b/zerotier-network-hypervisor/src/vl1/careof.rs index ae6857c31..6f8349fac 100644 --- a/zerotier-network-hypervisor/src/vl1/careof.rs +++ b/zerotier-network-hypervisor/src/vl1/careof.rs @@ -61,10 +61,12 @@ impl CareOf { } } + #[allow(unused)] pub fn verify(&self, signer: &Identity) -> bool { signer.verify(self.to_bytes_internal(false).as_slice(), self.signature.as_slice()) } + #[allow(unused)] pub fn contains(&self, id: &Identity) -> bool { self.fingerprints.binary_search(&id.fingerprint).is_ok() } diff --git a/zerotier-network-hypervisor/src/vl1/endpoint.rs b/zerotier-network-hypervisor/src/vl1/endpoint.rs index e46c6d1f5..d213c5c10 100644 --- a/zerotier-network-hypervisor/src/vl1/endpoint.rs +++ b/zerotier-network-hypervisor/src/vl1/endpoint.rs @@ -428,10 +428,11 @@ impl<'de> Deserialize<'de> for Endpoint { #[cfg(test)] mod tests { - use zerotier_core_crypto::hash::SHA512_HASH_SIZE; - use super::{Endpoint, MAX_MARSHAL_SIZE}; - use crate::{util::marshalable::Marshalable, vl1::Address}; + use crate::{ + util::marshalable::Marshalable, + vl1::{protocol::IDENTITY_FINGERPRINT_SIZE, Address}, + }; #[test] fn endpoint_default() { @@ -449,7 +450,7 @@ mod tests { fn endpoint_marshal() { use crate::util::buffer::Buffer; - let mut hash = [0u8; SHA512_HASH_SIZE]; + let mut hash = [0u8; IDENTITY_FINGERPRINT_SIZE]; hash.fill_with(|| rand::random()); let zte = Endpoint::ZeroTier(Address::from_u64(rand::random::() + 1).unwrap(), hash);