mirror of
https://github.com/ratspeak/rsReticulum
synced 2026-11-27 13:52:16 +00:00
ratkey: satisfy clippy
This commit is contained in:
1 parent
4ee47d40ac
commit
cd58bbc0ac
3 files changed
+6
-7
No files matched your search
@@ -743,7 +743,7 @@ mod tests {
|
||||
// A 200-byte "cert" (DER SEQUENCE header) forces long-form lengths, wrapped
|
||||
// as the PIV cert object: 53 L { 70 L <cert> 71 01 00 FE 00 }.
|
||||
let mut cert = vec![0x30, 0x81, 0xC5];
|
||||
cert.extend(std::iter::repeat(0xAB).take(197));
|
||||
cert.extend(std::iter::repeat_n(0xAB, 197));
|
||||
let mut inner = vec![0x70, 0x81, cert.len() as u8];
|
||||
inner.extend_from_slice(&cert);
|
||||
inner.extend_from_slice(&[0x71, 0x01, 0x00, 0xFE, 0x00]);
|
||||
|
||||
@@ -965,7 +965,7 @@ mod tests {
|
||||
&leaf.der,
|
||||
&sub.der,
|
||||
&[anchor_of(&root)],
|
||||
&[sub.cert.clone()],
|
||||
std::slice::from_ref(&sub.cert),
|
||||
now(),
|
||||
);
|
||||
assert!(res.is_ok(), "valid synthetic chain must verify: {res:?}");
|
||||
@@ -985,7 +985,7 @@ mod tests {
|
||||
&tampered_der,
|
||||
&sub.der,
|
||||
&[anchor_of(&root)],
|
||||
&[sub.cert.clone()],
|
||||
std::slice::from_ref(&sub.cert),
|
||||
now(),
|
||||
);
|
||||
assert!(
|
||||
@@ -1051,7 +1051,7 @@ mod tests {
|
||||
&leaf.der,
|
||||
&sub.der,
|
||||
&[anchor_of(&root)],
|
||||
&[sub.cert.clone()],
|
||||
std::slice::from_ref(&sub.cert),
|
||||
now(),
|
||||
);
|
||||
assert!(matches!(res, Err(ChainError::Expired)), "got {res:?}");
|
||||
|
||||
@@ -58,11 +58,10 @@ impl IdentityBackend for MockPivSession {
|
||||
self.ecdh_x25519(slot, peer_pub)
|
||||
}
|
||||
fn read_ed25519_public(&mut self, slot: u8) -> Result<[u8; 32], RatkeyError> {
|
||||
// Shared borrow so only the inherent `&self` method applies (not this trait method).
|
||||
(&*self).read_ed25519_public(slot)
|
||||
MockPivSession::read_ed25519_public(self, slot)
|
||||
}
|
||||
fn read_x25519_public(&mut self, slot: u8) -> Result<[u8; 32], RatkeyError> {
|
||||
(&*self).read_x25519_public(slot)
|
||||
MockPivSession::read_x25519_public(self, slot)
|
||||
}
|
||||
fn is_connected(&self) -> bool {
|
||||
self.is_connected()
|
||||
|
||||
Reference in new issue
Block a user