summaryrefslogtreecommitdiff
path: root/pith/send.c
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2014-05-31 21:37:10 -0600
committerEduardo Chappa <chappa@washington.edu>2014-05-31 21:37:10 -0600
commit60b67de2ba4be4d2bfeeeea685869e9a5a7363c0 (patch)
tree20831a8341dfe86c0f4c247df9ac5b5ec61b41db /pith/send.c
parentd8f387ef722cfb9e694d25c1ab182d01501f1b9d (diff)
downloadalpine-60b67de2ba4be4d2bfeeeea685869e9a5a7363c0.tar.xz
* new version 2.19.9991
* S/MIME Alpine would compute incorrectly the signature of a message that contains 8bit if the option "Enable 8bit ESMTP Negotiation" is enabled, the message contains 8bit characters and the smtp server supports 8bit sending. * Crash while redrawing S/MIME configuration screen when importing a certificate * When forwarding a message before opening it, the message might not be found. The problem is in the forward_body function, where the section of the body is not correctly set in all instances. * When forwarding a signed message Alpine might forward the message as a multipart message, instead of just selecting the body of the message. Change to forward the signed part only. This aligns Alpine with what it does when it replies to a similar message.
Diffstat (limited to 'pith/send.c')
-rw-r--r--pith/send.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/pith/send.c b/pith/send.c
index 191e186d..b01ff7e5 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -1762,21 +1762,23 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve
#ifdef SMIME
if(ps_global->smime && (ps_global->smime->do_encrypt || ps_global->smime->do_sign)){
int result;
-
+
STORE_S *so = lmc.so;
lmc.so = NULL;
-
+
result = 1;
-
- if(ps_global->smime->do_sign)
- result = sign_outgoing_message(header, &body, 0);
-
+
+ if(ps_global->smime->do_sign){
+ bp = F_ON(F_ENABLE_8BIT, ps_global) ? first_text_8bit(body) : NULL;
+ result = sign_outgoing_message(header, &body, 0, &bp);
+ }
+
/* need to free new body from encrypt if sign fails? */
if(result && ps_global->smime->do_encrypt)
result = encrypt_outgoing_message(header, &body);
-
+
lmc.so = so;
-
+
if(!result)
return 0;
}
@@ -1999,6 +2001,19 @@ call_mailer(METAENV *header, struct mail_bodystruct *body, char **alt_smtp_serve
body_encodings[added_encoding] = body_encodings[ENC8BIT];
save_encoding = bp->encoding;
bp->encoding = added_encoding;
+#ifdef SMIME
+ if(ps_global->smime && ps_global->smime->do_sign
+ && body->nested.part->next
+ && body->nested.part->next->body.contents.text.data
+ && body->nested.part->next->body.mime.text.data){
+ STORE_S *so;
+
+ so = (STORE_S *) body->nested.part->next->body.contents.text.data;
+ so_give(&so);
+ body->nested.part->next->body.contents.text.data = body->nested.part->next->body.mime.text.data;
+ body->nested.part->next->body.mime.text.data = NULL;
+ }
+#endif /* SMIME */
}
}