sync/cond_act_sync.yml2
branchsync
changeset 3767 11a9d0f61073
parent 3754 7d9c7bc6f412
child 3768 7fc561191d28
     1.1 --- a/sync/cond_act_sync.yml2	Wed May 29 11:37:44 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Wed May 29 16:11:32 2019 +0200
     1.3 @@ -59,7 +59,7 @@
     1.4      TID_t *t1 = &session->sync_state.keysync.negotiation;
     1.5      TID_t *t2 = &session->own_sync_state.negotiation;
     1.6  
     1.7 -    const char *s1 = session->sync_state.common.signature_fpr;
     1.8 +    const char *s1 = session->sync_state.comm_partner.signature_fpr;
     1.9      const char *s2 = session->own_sync_state.signature_fpr;
    1.10  
    1.11      // test if TID is identical
    1.12 @@ -70,8 +70,8 @@
    1.13  
    1.14  condition keyElectionWon
    1.15  ||
    1.16 -    pEp_identity *from = session->sync_state.common.from;
    1.17 -    char *signature_fpr = session->sync_state.common.signature_fpr;
    1.18 +    pEp_identity *from = session->sync_state.comm_partner.from;
    1.19 +    char *signature_fpr = session->sync_state.comm_partner.signature_fpr;
    1.20  
    1.21      assert(from && from->address && from->address[0] && from->user_id &&
    1.22              from->user_id[0]);
    1.23 @@ -147,7 +147,7 @@
    1.24      // store a copy of this challenge
    1.25      call "copy_UUID" {
    1.26          with "src" > &session->own_sync_state.challenge
    1.27 -        with "dst" > &session->sync_state.common.challenge
    1.28 +        with "dst" > &session->sync_state.comm_partner.challenge
    1.29      }
    1.30  }
    1.31  
    1.32 @@ -157,17 +157,17 @@
    1.33  }
    1.34  
    1.35  action useOwnChallenge call "copy_UUID" {
    1.36 -    with "src" > &session->sync_state.common.challenge
    1.37 +    with "src" > &session->sync_state.comm_partner.challenge
    1.38      with "dst" > &session->own_sync_state.challenge
    1.39  }
    1.40  
    1.41  action newTransaction {
    1.42  ||
    1.43      // sender key must be stable while transaction
    1.44 -    assert(session->sync_state.common.signature_fpr);
    1.45 +    assert(session->sync_state.comm_partner.signature_fpr);
    1.46      free(session->own_sync_state.signature_fpr);
    1.47      session->own_sync_state.signature_fpr
    1.48 -            = strdup(session->sync_state.common.signature_fpr);
    1.49 +            = strdup(session->sync_state.comm_partner.signature_fpr);
    1.50      assert(session->own_sync_state.signature_fpr);
    1.51      if (!session->own_sync_state.signature_fpr)
    1.52          return PEP_OUT_OF_MEMORY;
    1.53 @@ -198,10 +198,10 @@
    1.54  action storeTransaction {
    1.55  ||
    1.56      // sender key must be stable while transaction
    1.57 -    assert(session->sync_state.common.signature_fpr);
    1.58 +    assert(session->sync_state.comm_partner.signature_fpr);
    1.59      free(session->own_sync_state.signature_fpr);
    1.60      session->own_sync_state.signature_fpr
    1.61 -            = strdup(session->sync_state.common.signature_fpr);
    1.62 +            = strdup(session->sync_state.comm_partner.signature_fpr);
    1.63      assert(session->own_sync_state.signature_fpr);
    1.64      if (!session->own_sync_state.signature_fpr)
    1.65          return PEP_OUT_OF_MEMORY;
    1.66 @@ -239,11 +239,11 @@
    1.67      ||
    1.68      otherwise
    1.69      ||
    1.70 -        assert(session->sync_state.common.from);
    1.71 -        if (!session->sync_state.common.from)
    1.72 +        assert(session->sync_state.comm_partner.from);
    1.73 +        if (!session->sync_state.comm_partner.from)
    1.74              return PEP_ILLEGAL_VALUE;
    1.75  
    1.76 -        pEp_identity *from = session->sync_state.common.from;
    1.77 +        pEp_identity *from = session->sync_state.comm_partner.from;
    1.78          pEp_identity *me = NULL;
    1.79          PEP_STATUS status = get_identity(session, from->address, from->user_id, &me);
    1.80          assert(status == PEP_STATUS_OK);
    1.81 @@ -262,10 +262,10 @@
    1.82              return PEP_OUT_OF_MEMORY;
    1.83          }
    1.84  
    1.85 -        assert(session->sync_state.common.signature_fpr);
    1.86 -        if (session->sync_state.common.signature_fpr) {
    1.87 +        assert(session->sync_state.comm_partner.signature_fpr);
    1.88 +        if (session->sync_state.comm_partner.signature_fpr) {
    1.89              free(partner->fpr);
    1.90 -            partner->fpr = strdup(session->sync_state.common.signature_fpr);
    1.91 +            partner->fpr = strdup(session->sync_state.comm_partner.signature_fpr);
    1.92              if (!partner->fpr) {
    1.93                  free_identity(me);
    1.94                  free_identity(partner);
    1.95 @@ -388,7 +388,7 @@
    1.96      for (il = session->own_sync_state.own_identities; il && il->ident ; il = il->next) {
    1.97          // replace partner's user_id with own user_id
    1.98          free(il->ident->user_id);
    1.99 -        il->ident->user_id = strdup(session->sync_state.common.from->user_id);
   1.100 +        il->ident->user_id = strdup(session->sync_state.comm_partner.from->user_id);
   1.101          if (!il->ident->user_id) {
   1.102              free_identity_list(il);
   1.103              return PEP_OUT_OF_MEMORY;
   1.104 @@ -412,15 +412,15 @@
   1.105  
   1.106  action trustThisKey
   1.107  ||
   1.108 -    assert(session->sync_state.common.from && session->sync_state.common.signature_fpr);
   1.109 -    if (!(session->sync_state.common.from && session->sync_state.common.signature_fpr))
   1.110 +    assert(session->sync_state.comm_partner.from && session->sync_state.comm_partner.signature_fpr);
   1.111 +    if (!(session->sync_state.comm_partner.from && session->sync_state.comm_partner.signature_fpr))
   1.112          return PEP_ILLEGAL_VALUE;
   1.113  
   1.114 -    pEp_identity *ident = identity_dup(session->sync_state.common.from);
   1.115 +    pEp_identity *ident = identity_dup(session->sync_state.comm_partner.from);
   1.116      if (!ident)
   1.117          return PEP_OUT_OF_MEMORY;
   1.118      free(ident->fpr);
   1.119 -    ident->fpr = strdup(session->sync_state.common.signature_fpr);
   1.120 +    ident->fpr = strdup(session->sync_state.comm_partner.signature_fpr);
   1.121      assert(ident->fpr);
   1.122      if (!ident->fpr) {
   1.123          free_identity(ident);
   1.124 @@ -439,13 +439,13 @@
   1.125  
   1.126  action untrustThisKey
   1.127  ||
   1.128 -    assert(session->sync_state.common.from && session->sync_state.common.signature_fpr);
   1.129 -    if (!(session->sync_state.common.from && session->sync_state.common.signature_fpr))
   1.130 +    assert(session->sync_state.comm_partner.from && session->sync_state.comm_partner.signature_fpr);
   1.131 +    if (!(session->sync_state.comm_partner.from && session->sync_state.comm_partner.signature_fpr))
   1.132          return PEP_ILLEGAL_VALUE;
   1.133  
   1.134 -    pEp_identity *ident = session->sync_state.common.from;
   1.135 +    pEp_identity *ident = session->sync_state.comm_partner.from;
   1.136      free(ident->fpr);
   1.137 -    ident->fpr = strdup(session->sync_state.common.signature_fpr);
   1.138 +    ident->fpr = strdup(session->sync_state.comm_partner.signature_fpr);
   1.139      assert(ident->fpr);
   1.140      if (!ident->fpr)
   1.141          return PEP_OUT_OF_MEMORY;