ENGINE-602 fix merged sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 07 Aug 2019 12:10:12 +0200
branchsync
changeset 39531690e12b4bc4
parent 3941 1f8cf96379ac
parent 3945 7de09fb6c9c9
child 3958 092843cb7ad2
child 3960 932e02830434
child 3961 0eb8fc56d6fb
ENGINE-602 fix merged
     1.1 --- a/src/message_api.c	Thu Aug 01 14:17:10 2019 +0200
     1.2 +++ b/src/message_api.c	Wed Aug 07 12:10:12 2019 +0200
     1.3 @@ -1118,8 +1118,9 @@
     1.4          return false;
     1.5      if (msg->attachments->next->next)
     1.6          return false;
     1.7 -    if (!msg->attachments->mime_type ||
     1.8 -        strcmp(msg->attachments->mime_type, "application/pgp-encrypted") != 0)    
     1.9 +    if (!msg->attachments->mime_type)
    1.10 +        return false;        
    1.11 +    if (strcmp(msg->attachments->mime_type, "application/pgp-encrypted") != 0)    
    1.12          return false;
    1.13      if (!msg->attachments->next->mime_type || 
    1.14          strcmp(msg->attachments->next->mime_type, "application/octet-stream") != 0)        
    1.15 @@ -3417,7 +3418,8 @@
    1.16      // This import is from the outermost message.
    1.17      // We don't do this for PGP_mime.
    1.18      bool imported_keys = false;
    1.19 -    if (!_has_PGP_MIME_format(src))
    1.20 +    PEP_cryptotech enc_type = determine_encryption_format(src);
    1.21 +    if (enc_type != PEP_crypt_OpenPGP || !(src->enc_format == PEP_enc_PGP_MIME || src->enc_format == PEP_enc_PGP_MIME_Outlook1))
    1.22          imported_keys = import_attached_keys(session, src, NULL);
    1.23              
    1.24      import_header_keys(session, src);
     2.1 --- a/test/src/SuiteMaker.cc	Thu Aug 01 14:17:10 2019 +0200
     2.2 +++ b/test/src/SuiteMaker.cc	Wed Aug 07 12:10:12 2019 +0200
     2.3 @@ -21,6 +21,7 @@
     2.4  #include "Engine463Tests.h"
     2.5  #include "IOS1664Tests.h"
     2.6  #include "BloblistTests.h"
     2.7 +#include "KeyImportAndRetrieveTests.h"
     2.8  #include "NewUpdateIdAndMyselfTests.h"
     2.9  #include "NoOwnIdentWritesOnDecryptTests.h"
    2.10  #include "LiteralFilenameTests.h"
    2.11 @@ -29,6 +30,7 @@
    2.12  #include "PgpBinaryTests.h"
    2.13  #include "SubkeyRatingEvalTests.h"
    2.14  #include "MessageNullFromTests.h"
    2.15 +#include "Engine587Tests.h"
    2.16  #include "ExportKeyTests.h"
    2.17  #include "LeastCommonDenomColorTests.h"
    2.18  #include "StringlistTests.h"
    2.19 @@ -87,6 +89,7 @@
    2.20      "Engine463Tests",
    2.21      "IOS1664Tests",
    2.22      "BloblistTests",
    2.23 +    "KeyImportAndRetrieveTests",
    2.24      "NewUpdateIdAndMyselfTests",
    2.25      "NoOwnIdentWritesOnDecryptTests",
    2.26      "LiteralFilenameTests",
    2.27 @@ -95,6 +98,7 @@
    2.28      "PgpBinaryTests",
    2.29      "SubkeyRatingEvalTests",
    2.30      "MessageNullFromTests",
    2.31 +    "Engine587Tests",
    2.32      "ExportKeyTests",
    2.33      "LeastCommonDenomColorTests",
    2.34      "StringlistTests",
    2.35 @@ -144,7 +148,7 @@
    2.36  };
    2.37  
    2.38  // This file is generated, so magic constants are ok.
    2.39 -int SuiteMaker::num_suites = 63;
    2.40 +int SuiteMaker::num_suites = 65;
    2.41  
    2.42  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
    2.43      if (strcmp(test_class_name, "URIAddressTests") == 0)
    2.44 @@ -165,6 +169,8 @@
    2.45          *test_suite = new IOS1664Tests(test_class_name, test_home);
    2.46      else if (strcmp(test_class_name, "BloblistTests") == 0)
    2.47          *test_suite = new BloblistTests(test_class_name, test_home);
    2.48 +    else if (strcmp(test_class_name, "KeyImportAndRetrieveTests") == 0)
    2.49 +        *test_suite = new KeyImportAndRetrieveTests(test_class_name, test_home);
    2.50      else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
    2.51          *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
    2.52      else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
    2.53 @@ -181,6 +187,8 @@
    2.54          *test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
    2.55      else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
    2.56          *test_suite = new MessageNullFromTests(test_class_name, test_home);
    2.57 +    else if (strcmp(test_class_name, "Engine587Tests") == 0)
    2.58 +        *test_suite = new Engine587Tests(test_class_name, test_home);
    2.59      else if (strcmp(test_class_name, "ExportKeyTests") == 0)
    2.60          *test_suite = new ExportKeyTests(test_class_name, test_home);
    2.61      else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)