crypto: Test signature verification with an invalid key.
This commit is contained in:
parent
84e7a49bbf
commit
92067c400c
1 changed files with 15 additions and 0 deletions
|
@ -322,4 +322,19 @@ mod test {
|
|||
);
|
||||
assert!(ret.is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_invalid_signature() {
|
||||
let machine = OlmMachine::new(USER_ID, DEVICE_ID);
|
||||
|
||||
let mut device_keys = machine.device_keys();
|
||||
|
||||
let ret = machine.verify_json(
|
||||
&machine.user_id,
|
||||
&machine.device_id,
|
||||
"fake_key",
|
||||
&mut device_keys,
|
||||
);
|
||||
assert!(ret.is_err());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue