sync/cond_act_sync.yml2
branchsync
changeset 3524 c87c6b4f3e08
parent 3523 9555e664423f
child 3525 03981c2354de
     1.1 --- a/sync/cond_act_sync.yml2	Sun Apr 14 16:00:52 2019 +0200
     1.2 +++ b/sync/cond_act_sync.yml2	Sun Apr 14 16:54:48 2019 +0200
     1.3 @@ -195,6 +195,12 @@
     1.4  action hideHandshakeDialog
     1.5      call "show_handshake" with "type" > SYNC_NOTIFY_OVERTAKEN
     1.6  
     1.7 +action showDeviceAdded
     1.8 +    call "show_handshake" with "type" > SYNC_NOTIFY_ACCEPTED_DEVICE_ADDED
     1.9 +
    1.10 +action showGroupCreated
    1.11 +    call "show_handshake" with "type" > SYNC_NOTIFY_ACCEPTED_GROUP_CREATED
    1.12 +
    1.13  timeout KeySync
    1.14      call "show_handshake" with "type" > SYNC_NOTIFY_TIMEOUT
    1.15  
    1.16 @@ -251,6 +257,16 @@
    1.17  
    1.18  action receivedKeysAreGroupKeys;
    1.19  
    1.20 +action storeThisKey
    1.21 +||
    1.22 +    free(session->sync_state.common.signature_fpr);
    1.23 +    session->sync_state.common.signature_fpr =
    1.24 +            strndup((char *)session->sync_state.keysync.key.buf, session->sync_state.keysync.key.size);
    1.25 +    assert(session->sync_state.common.signature_fpr);
    1.26 +    if (!session->sync_state.common.signature_fpr)
    1.27 +        return PEP_OUT_OF_MEMORY;
    1.28 +||
    1.29 +
    1.30  action trustThisKey
    1.31  ||
    1.32      assert(session->sync_state.common.from && session->sync_state.common.signature_fpr);
    1.33 @@ -271,6 +287,26 @@
    1.34      OCTET_STRING_fromBuf(&session->sync_state.keysync.key, ident->fpr, strlen(ident->fpr));
    1.35  ||
    1.36  
    1.37 +action untrustThisKey
    1.38 +||
    1.39 +    assert(session->sync_state.common.from && session->sync_state.common.signature_fpr);
    1.40 +    if (!(session->sync_state.common.from && session->sync_state.common.signature_fpr))
    1.41 +        return PEP_ILLEGAL_VALUE;
    1.42 +
    1.43 +    pEp_identity *ident = session->sync_state.common.from;
    1.44 +    free(ident->fpr);
    1.45 +    ident->fpr = strdup(session->sync_state.common.signature_fpr);
    1.46 +    assert(ident->fpr);
    1.47 +    if (!ident->fpr)
    1.48 +        return PEP_OUT_OF_MEMORY;
    1.49 +
    1.50 +    PEP_STATUS status = key_reset_trust(session, ident);
    1.51 +    if (status)
    1.52 +        return status;
    1.53 +
    1.54 +    OCTET_STRING_fromBuf(&session->sync_state.keysync.key, "", 0);
    1.55 +||
    1.56 +
    1.57  action tellWeAreGrouped
    1.58  ||
    1.59      session->sync_state.keysync.is_group = true;