Verify stored keychain SSH signatures
This commit is contained in:
parent
788522404d
commit
f7f14f6b27
10 changed files with 160 additions and 15 deletions
|
|
@ -710,6 +710,8 @@ fn keychain_init_and_status_use_local_keychain_log() {
|
|||
assert!(status.initialized);
|
||||
assert_eq!(status.admin_keys, 1);
|
||||
assert_eq!(status.signatures, 0);
|
||||
assert_eq!(status.verified_signatures, 0);
|
||||
assert_eq!(status.failed_signatures, 0);
|
||||
assert_eq!(status.users, 0);
|
||||
}
|
||||
other => panic!("unexpected response: {other:?}"),
|
||||
|
|
@ -752,6 +754,7 @@ fn keychain_init_can_record_openssh_signatures() {
|
|||
assert_eq!(signatures.len(), 2);
|
||||
assert!(signatures.iter().all(|signature| {
|
||||
signature.namespace == "geth.keychain.v1@geth.local"
|
||||
&& signature.signer_public_key.starts_with("ssh-ed25519 ")
|
||||
&& !signature.signature.is_empty()
|
||||
}));
|
||||
}
|
||||
|
|
@ -769,6 +772,8 @@ fn keychain_init_can_record_openssh_signatures() {
|
|||
match response {
|
||||
geth_control::ControlResponse::KeychainStatus(status) => {
|
||||
assert_eq!(status.signatures, 2);
|
||||
assert_eq!(status.verified_signatures, 2);
|
||||
assert_eq!(status.failed_signatures, 0);
|
||||
}
|
||||
other => panic!("unexpected response: {other:?}"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue