@@ -429,3 +429,51 @@ def test_aeap_flow_verified(acfactory):
429
429
assert ac1new .get_config ("addr" ) in [
430
430
contact .get_snapshot ().address for contact in msg_in_2_snapshot .chat .get_contacts ()
431
431
]
432
+
433
+
434
+ def test_gossip_verification (acfactory ) -> None :
435
+ alice , bob , carol = acfactory .get_online_accounts (3 )
436
+
437
+ # Bob verifies Alice.
438
+ qr_code , _svg = alice .get_qr_code ()
439
+ bob .secure_join (qr_code )
440
+ bob .wait_for_securejoin_joiner_success ()
441
+
442
+ # Bob verifies Carol.
443
+ qr_code , _svg = carol .get_qr_code ()
444
+ bob .secure_join (qr_code )
445
+ bob .wait_for_securejoin_joiner_success ()
446
+
447
+ bob_contact_alice = bob .create_contact (alice .get_config ("addr" ), "Alice" )
448
+ bob_contact_carol = bob .create_contact (carol .get_config ("addr" ), "Carol" )
449
+ carol_contact_alice = carol .create_contact (alice .get_config ("addr" ), "Alice" )
450
+
451
+ logging .info ("Bob creates an Autocrypt group" )
452
+ bob_group_chat = bob .create_group ("Autocrypt Group" )
453
+ assert not bob_group_chat .get_basic_snapshot ().is_protected
454
+ bob_group_chat .add_contact (bob_contact_alice )
455
+ bob_group_chat .add_contact (bob_contact_carol )
456
+ bob_group_chat .send_message (text = "Hello Autocrypt group" )
457
+
458
+ snapshot = carol .get_message_by_id (carol .wait_for_incoming_msg_event ().msg_id ).get_snapshot ()
459
+ assert snapshot .text == "Hello Autocrypt group"
460
+ assert snapshot .show_padlock
461
+
462
+ # Autocrypt group does not propagate verification.
463
+ carol_contact_alice_snapshot = carol_contact_alice .get_snapshot ()
464
+ assert not carol_contact_alice_snapshot .is_verified
465
+
466
+ logging .info ("Bob creates a Securejoin group" )
467
+ bob_group_chat = bob .create_group ("Securejoin Group" , protect = True )
468
+ assert bob_group_chat .get_basic_snapshot ().is_protected
469
+ bob_group_chat .add_contact (bob_contact_alice )
470
+ bob_group_chat .add_contact (bob_contact_carol )
471
+ bob_group_chat .send_message (text = "Hello Securejoin group" )
472
+
473
+ snapshot = carol .get_message_by_id (carol .wait_for_incoming_msg_event ().msg_id ).get_snapshot ()
474
+ assert snapshot .text == "Hello Securejoin group"
475
+ assert snapshot .show_padlock
476
+
477
+ # Securejoin propagates verification.
478
+ carol_contact_alice_snapshot = carol_contact_alice .get_snapshot ()
479
+ assert carol_contact_alice_snapshot .is_verified
0 commit comments