merge ENGINE-559
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 07 Aug 2019 12:13:55 +0200
branchENGINE-559
changeset 39569d68c401928f
parent 3951 7f9e34a102bb
parent 3955 77d397b32029
child 3957 ebb248ccdd21
merge
     1.1 --- a/src/message_api.c	Wed Aug 07 12:03:49 2019 +0200
     1.2 +++ b/src/message_api.c	Wed Aug 07 12:13:55 2019 +0200
     1.3 @@ -1088,8 +1088,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 @@ -3446,7 +3447,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);