Explorar o código

Check the MACs on the Bucket Reachability credentials in the tests

Ian Goldberg %!s(int64=3) %!d(string=hai) anos
pai
achega
aa72dfe7f4
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/tests.rs

+ 3 - 0
src/tests.rs

@@ -45,6 +45,7 @@ fn test_open_invite() {
         bridge_table::BridgeTable::decrypt_bucket(id, &key, &encbuckets[id as usize]).unwrap();
     println!("cred = {:?}", cred);
     println!("bucket = {:?}", bucket);
+    assert!(bucket.1.is_none());
     assert!(ba.verify_lox(&cred));
 }
 
@@ -115,6 +116,7 @@ fn test_trust_promotion() {
     let bucket =
         bridge_table::BridgeTable::decrypt_bucket(id, &key, &encbuckets[id as usize]).unwrap();
     println!("bucket = {:?}", bucket);
+    assert!(ba.verify_reachability(&bucket.1.unwrap()));
 }
 
 #[test]
@@ -136,4 +138,5 @@ fn test_level0_migration() {
     let bucket =
         bridge_table::BridgeTable::decrypt_bucket(id, &key, &encbuckets[id as usize]).unwrap();
     println!("bucket = {:?}", bucket);
+    assert!(ba.verify_reachability(&bucket.1.unwrap()));
 }