if one in the group accepted that's valid for all sync
authorVolker Birk <vb@pep-project.org>
Sun, 14 Apr 2019 16:00:52 +0200
branchsync
changeset 35239555e664423f
parent 3522 c8e3e531d40a
child 3524 c87c6b4f3e08
if one in the group accepted that's valid for all
sync/cond_act_sync.yml2
sync/sync.fsm
     1.1 --- a/sync/cond_act_sync.yml2	Sun Apr 14 15:43:39 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Sun Apr 14 16:00:52 2019 +0200
     1.3 @@ -267,6 +267,8 @@
     1.4      PEP_STATUS status = trust_own_key(session, ident);
     1.5      if (status)
     1.6          return status;
     1.7 +
     1.8 +    OCTET_STRING_fromBuf(&session->sync_state.keysync.key, ident->fpr, strlen(ident->fpr));
     1.9  ||
    1.10  
    1.11  action tellWeAreGrouped
     2.1 --- a/sync/sync.fsm	Sun Apr 14 15:43:39 2019 +0200
     2.2 +++ b/sync/sync.fsm	Sun Apr 14 16:00:52 2019 +0200
     2.3 @@ -372,6 +372,7 @@
     2.4              // Accept is Phase1Commit
     2.5              on Accept {
     2.6                  do trustThisKey;
     2.7 +                send GroupTrustThisKey;
     2.8                  send CommitAcceptForGroup;
     2.9                  go HandshakingGroupedPhase1;
    2.10              }
    2.11 @@ -379,6 +380,11 @@
    2.12              on CommitAccept if sameTransaction
    2.13                  go HandshakingGroupedPhase2;
    2.14  
    2.15 +            on GroupTrustThisKey {
    2.16 +                do hideHandshakeDialog;
    2.17 +                go Grouped;
    2.18 +            }
    2.19 +
    2.20              on GroupKeys
    2.21                  do saveGroupKeys;
    2.22          }
    2.23 @@ -395,6 +401,9 @@
    2.24                  go Grouped;
    2.25              }
    2.26  
    2.27 +            on GroupTrustThisKey
    2.28 +                go Grouped;
    2.29 +
    2.30              on GroupKeys
    2.31                  do saveGroupKeys;
    2.32          }
    2.33 @@ -412,10 +421,16 @@
    2.34  
    2.35              on Accept {
    2.36                  do trustThisKey;
    2.37 +                send GroupTrustThisKey;
    2.38                  send GroupKeysAndClose;
    2.39                  go Grouped;
    2.40              }
    2.41  
    2.42 +            on GroupTrustThisKey {
    2.43 +                do hideHandshakeDialog;
    2.44 +                go Grouped;
    2.45 +            }
    2.46 +
    2.47              on GroupKeys
    2.48                  do saveGroupKeys;
    2.49          }
    2.50 @@ -459,14 +474,19 @@
    2.51              field TID transaction;
    2.52          }
    2.53  
    2.54 +        // default: security=trusted only
    2.55 +        message GroupTrustThisKey 9 {
    2.56 +            field Hash key;
    2.57 +        }
    2.58 +
    2.59          // security=attach_own_keys implies security=trusted
    2.60 -        message GroupKeysAndClose 9, security=attach_own_keys {
    2.61 +        message GroupKeysAndClose 10, security=attach_own_keys {
    2.62              field TID transaction;
    2.63              field IdentityList ownIdentities;
    2.64          }
    2.65  
    2.66          // security=attach_own_keys implies security=trusted
    2.67 -        message GroupKeys 10, security=attach_own_keys {
    2.68 +        message GroupKeys 11, security=attach_own_keys {
    2.69              field IdentityList ownIdentities;
    2.70          }
    2.71      }