ENGINE-140: stop making a drama when GroupUpdate or UpdateRequest is signed with wrong key. Just discard it. ENGINE-140
authorEdouard Tisserant <edouard@pep-project.org>
Thu, 10 Nov 2016 18:06:09 +0100
branchENGINE-140
changeset 136867a5dc1a97f8
parent 1367 48449a2a81ed
child 1369 9df1ba0ecf18
ENGINE-140: stop making a drama when GroupUpdate or UpdateRequest is signed with wrong key. Just discard it.
src/sync_impl.c
     1.1 --- a/src/sync_impl.c	Thu Nov 10 01:35:59 2016 +0100
     1.2 +++ b/src/sync_impl.c	Thu Nov 10 18:06:09 2016 +0100
     1.3 @@ -343,7 +343,8 @@
     1.4                                  goto free_all;
     1.5                              }
     1.6                              status = get_trust(session, _from);
     1.7 -                            if (_from->comm_type < PEP_ct_strong_encryption) {
     1.8 +                            if (status != PEP_STATUS_OK || _from->comm_type < PEP_ct_strong_encryption) {
     1.9 +                                status = PEP_STATUS_OK;
    1.10                                  free_identity(_from);
    1.11                                  discard = true;
    1.12                                  goto free_all;
    1.13 @@ -374,7 +375,8 @@
    1.14                                  goto free_all;
    1.15                              }
    1.16                              status = get_trust(session, _from);
    1.17 -                            if (_from->comm_type < PEP_ct_pEp) {
    1.18 +                            if (status != PEP_STATUS_OK || _from->comm_type < PEP_ct_pEp) {
    1.19 +                                status = PEP_STATUS_OK;
    1.20                                  free_identity(_from);
    1.21                                  discard = true;
    1.22                                  goto free_all;