diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-29 22:16:15 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-29 22:16:15 +0100 |
| commit | bc0de9955c375cf27d52c9934403964205afc182 (patch) | |
| tree | 42799fb426fb0ec164f44c92a63525003c582f35 /tests/tofu.rs | |
| parent | initial connection timeout set to 10s (diff) | |
| download | zagan-bet-bc0de9955c375cf27d52c9934403964205afc182.tar.gz zagan-bet-bc0de9955c375cf27d52c9934403964205afc182.zip | |
formatting
Diffstat (limited to '')
| -rw-r--r-- | tests/tofu.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tofu.rs b/tests/tofu.rs index 4f59d6d..b644cc4 100644 --- a/tests/tofu.rs +++ b/tests/tofu.rs | |||
| @@ -74,7 +74,10 @@ fn fingerprint_is_sha256_of_spki() { | |||
| 74 | let expected = openssl_spki_sha256(dir.join("primary.pem").to_str().unwrap()); | 74 | let expected = openssl_spki_sha256(dir.join("primary.pem").to_str().unwrap()); |
| 75 | 75 | ||
| 76 | let fp = spki_fingerprint(&der).expect("must parse the test certificate"); | 76 | let fp = spki_fingerprint(&der).expect("must parse the test certificate"); |
| 77 | assert_eq!(fp, expected, "fingerprint must equal openssl's SPKI SHA-256"); | 77 | assert_eq!( |
| 78 | fp, expected, | ||
| 79 | "fingerprint must equal openssl's SPKI SHA-256" | ||
| 80 | ); | ||
| 78 | } | 81 | } |
| 79 | 82 | ||
| 80 | #[test] | 83 | #[test] |
| @@ -90,10 +93,7 @@ fn first_contact_trusts_and_records() { | |||
| 90 | 93 | ||
| 91 | #[test] | 94 | #[test] |
| 92 | fn matching_key_is_trusted() { | 95 | fn matching_key_is_trusted() { |
| 93 | assert_eq!( | 96 | assert_eq!(decide(Some("ab12cd34"), "ab12cd34"), TrustDecision::Trusted); |
| 94 | decide(Some("ab12cd34"), "ab12cd34"), | ||
| 95 | TrustDecision::Trusted | ||
| 96 | ); | ||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | #[test] | 99 | #[test] |
