[domistream] Host pairing: the host's state machine (pending-PIN slot, proof and signature checks, deadlines from the caller, trusted clients without a PIN)
This commit is contained in:
@@ -308,10 +308,13 @@ fn genuine_phase4(d: &mut Duo) -> (Vec<u8>, Vec<u8>) {
|
||||
}
|
||||
}
|
||||
|
||||
/// Builds a phase-4 value from the genuine secret and signature.
|
||||
type Forge = dyn Fn(&[u8], &[u8]) -> Vec<u8>;
|
||||
|
||||
#[test]
|
||||
fn bad_client_signatures() {
|
||||
let rogue = rogue_id();
|
||||
let cases: Vec<(&str, Box<dyn Fn(&[u8], &[u8]) -> Vec<u8>>)> = vec![
|
||||
let cases: Vec<(&str, Box<Forge>)> = vec![
|
||||
("signed by another key", Box::new(move |s, _| [s.to_vec(), rogue.sign(s).unwrap()].concat())),
|
||||
(
|
||||
"one bit flipped",
|
||||
|
||||
Reference in New Issue
Block a user