removed offending code for ENGINE-151 - need to fix extant PEP_enc_PGP_MIME case instead for_Outlook-1.1.10
authorKrista Grothoff <krista@pep-project.org>
Wed, 30 Nov 2016 06:10:19 +0100
changeset 14573efe9ded2561
parent 1456 eb18b5c647c9
child 1458 443278ea9c47
child 1461 ae8ce038b682
child 1483 65bf8eef6d70
removed offending code for ENGINE-151 - need to fix extant PEP_enc_PGP_MIME case instead
src/message_api.c
     1.1 --- a/src/message_api.c	Tue Nov 29 16:32:32 2016 +0100
     1.2 +++ b/src/message_api.c	Wed Nov 30 06:10:19 2016 +0100
     1.3 @@ -1477,30 +1477,30 @@
     1.4      // Check for encryption stuck in the first 2 attachments instead of the body
     1.5      // (RFC3156)
     1.6      //
     1.7 -    if (!src->longmsg && !src->longmsg_formatted) {
     1.8 -        bloblist_t* attached_head = src->attachments;
     1.9 -        if (attached_head && 
    1.10 -            strcasecmp(attached_head->mime_type, "application/pgp-encrypted") == 0) {
    1.11 -            bloblist_t* enc_att_txt = attached_head->next;
    1.12 -            if (enc_att_txt && 
    1.13 -                strcasecmp(enc_att_txt->mime_type, "application/octet-stream") == 0) {
    1.14 -                size_t enc_att_len = enc_att_txt->size;
    1.15 -                char* newlongmsg = calloc(1, enc_att_len + 1);
    1.16 -                if (newlongmsg == NULL)
    1.17 -                    goto enomem;
    1.18 -
    1.19 -                memcpy(newlongmsg, enc_att_txt, enc_att_len);
    1.20 -                newlongmsg[enc_att_len] = '\0';
    1.21 -
    1.22 -                src->longmsg = newlongmsg;
    1.23 -
    1.24 -                // delete attachments here
    1.25 -                src->attachments = enc_att_txt->next;
    1.26 -                consume_bloblist_head(attached_head);
    1.27 -                consume_bloblist_head(attached_head);
    1.28 -            }
    1.29 -        }
    1.30 -    }
    1.31 +    // if (!src->longmsg && !src->longmsg_formatted) {
    1.32 +    //     bloblist_t* attached_head = src->attachments;
    1.33 +    //     if (attached_head && 
    1.34 +    //         strcasecmp(attached_head->mime_type, "application/pgp-encrypted") == 0) {
    1.35 +    //         bloblist_t* enc_att_txt = attached_head->next;
    1.36 +    //         if (enc_att_txt && 
    1.37 +    //             strcasecmp(enc_att_txt->mime_type, "application/octet-stream") == 0) {
    1.38 +    //             size_t enc_att_len = enc_att_txt->size;
    1.39 +    //             char* newlongmsg = calloc(1, enc_att_len + 1);
    1.40 +    //             if (newlongmsg == NULL)
    1.41 +    //                 goto enomem;
    1.42 +    // 
    1.43 +    //             memcpy(newlongmsg, enc_att_txt, enc_att_len);
    1.44 +    //             newlongmsg[enc_att_len] = '\0';
    1.45 +    // 
    1.46 +    //             src->longmsg = newlongmsg;
    1.47 +    // 
    1.48 +    //             // delete attachments here
    1.49 +    //             src->attachments = enc_att_txt->next;
    1.50 +    //             consume_bloblist_head(attached_head);
    1.51 +    //             consume_bloblist_head(attached_head);
    1.52 +    //         }
    1.53 +    //     }
    1.54 +    // }
    1.55  
    1.56      // Get detached signature, if any
    1.57      bloblist_t* detached_sig = NULL;