src/sync_impl.c
branchkeysync
changeset 1101 a9e46b630bf4
parent 1099 113463c3e85a
child 1102 9fdf0e11bf18
     1.1 --- a/src/sync_impl.c	Wed Aug 31 09:41:23 2016 +0200
     1.2 +++ b/src/sync_impl.c	Wed Aug 31 10:13:37 2016 +0200
     1.3 @@ -242,6 +242,17 @@
     1.4      me = NULL;
     1.5  
     1.6      if (encrypted) {
     1.7 +        if (msg->payload.present == DeviceGroup_Protocol__payload_PR_groupKeys) {
     1.8 +            PEP_rating rating = PEP_rating_undefined;
     1.9 +            status = outgoing_message_rating(session, _message, &rating);
    1.10 +            if (status != PEP_STATUS_OK)
    1.11 +                goto error;
    1.12 +            if (rating < PEP_rating_trusted) {
    1.13 +                status = PEP_SYNC_NO_TRUST;
    1.14 +                goto error;
    1.15 +            }
    1.16 +        }
    1.17 +
    1.18          message *_encrypted = NULL;
    1.19          status = encrypt_message(session, _message, NULL, &_encrypted, PEP_enc_PEP, 0);
    1.20          if (status != PEP_STATUS_OK)