Sync: fixed beaconing not happening on CannotDecrypt event
authorEdouard Tisserant <edouard@pep-project.org>
Wed, 12 Oct 2016 17:17:54 +0200
changeset 12714135e2be98f8
parent 1270 f07300d75b4b
child 1272 d7db8e18f439
Sync: fixed beaconing not happening on CannotDecrypt event
src/message_api.c
     1.1 --- a/src/message_api.c	Wed Oct 12 16:03:16 2016 +0200
     1.2 +++ b/src/message_api.c	Wed Oct 12 17:17:54 2016 +0200
     1.3 @@ -1438,8 +1438,11 @@
     1.4      status = cryptotech[crypto].decrypt_and_verify(session, ctext,
     1.5                                                     csize, &ptext, &psize, &_keylist);
     1.6      if (status > PEP_CANNOT_DECRYPT_UNKNOWN){
     1.7 +        goto pep_error;
     1.8 +    }
     1.9 +
    1.10 +    if (status == PEP_DECRYPT_NO_KEY){
    1.11          status = inject_DeviceState_event(session, CannotDecrypt, NULL, NULL);
    1.12 -        goto pep_error;
    1.13      }
    1.14  
    1.15      decrypt_status = status;