ENGINE-434: intermittent commit - need to update tests for yesterdays crypto-dev discussion and then we'll see if things work correctly ENGINE-434
authorKrista Bennett <krista@pep-project.org>
Wed, 20 Jun 2018 10:32:41 +0200
branchENGINE-434
changeset 27564a814f99426c
parent 2755 65c6b4bb11a6
child 2758 e66f55294370
ENGINE-434: intermittent commit - need to update tests for yesterdays crypto-dev discussion and then we'll see if things work correctly
src/message_api.c
test/src/SuiteMaker.cc
     1.1 --- a/src/message_api.c	Wed Jun 20 09:36:04 2018 +0200
     1.2 +++ b/src/message_api.c	Wed Jun 20 10:32:41 2018 +0200
     1.3 @@ -3223,15 +3223,16 @@
     1.4  
     1.5              if (!wrap_info) {
     1.6                  // NOT Message 2.0.
     1.7 -                // Fail hard on 1.0 and PGP/MIME messages which don't verify. 
     1.8 -                // (We will have been failing anyway due to gpg error codes, but we make sure here.)
     1.9 +                // EFAIL: We already fail due to gpg error codes (not MDC directly, but a GPG_ERR_NO_DATA)
    1.10 +                // This is to determine failure behaviour for unsigned or signed-but-no-key-available messages 
    1.11 +                // Bad sigs still fail as they should.
    1.12                  if (decrypt_status == PEP_DECRYPTED) {
    1.13 -                    if (!inline_pgp) {
    1.14 -                        if (!_keylist || EMPTYSTR(_keylist->value))
    1.15 -                            status = decrypt_status = PEP_DECRYPTED_BUT_UNSIGNED;
    1.16 -                        else
    1.17 -                            status = decrypt_status = PEP_DECRYPT_NO_KEY_FOR_SIGNER;
    1.18 -                        
    1.19 +                    if (!_keylist || EMPTYSTR(_keylist->value))
    1.20 +                        status = decrypt_status = PEP_DECRYPTED_BUT_UNSIGNED;
    1.21 +                    else
    1.22 +                        status = decrypt_status = PEP_DECRYPT_NO_KEY_FOR_SIGNER;
    1.23 +                    
    1.24 +                    if (is_pep_msg) {                        
    1.25                          if (decrypt_status == PEP_DECRYPTED_BUT_UNSIGNED && !deliver_badsig_pgpmime) {
    1.26                              *rating = decrypt_rating(decrypt_status);
    1.27                              goto pep_error;
     2.1 --- a/test/src/SuiteMaker.cc	Wed Jun 20 09:36:04 2018 +0200
     2.2 +++ b/test/src/SuiteMaker.cc	Wed Jun 20 10:32:41 2018 +0200
     2.3 @@ -92,7 +92,7 @@
     2.4  };
     2.5  
     2.6  // This file is generated, so magic constants are ok.
     2.7 -int SuiteMaker::num_suites = 36;
     2.8 +int SuiteMaker::num_suites = 37;
     2.9  
    2.10  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
    2.11      if (strcmp(test_class_name, "MapAsn1Tests") == 0)