summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2019-06-03 11:14:11 -0600
committerEduardo Chappa <chappa@washington.edu>2019-06-03 11:14:11 -0600
commit8a8766c0b2117dbf64655ec62331319077c1b803 (patch)
tree84db3ef07549409a572c23dd1ec7755b2a46b64a
parentb5d82108552f45e6ccd38677a00fcfd9b41c1021 (diff)
downloadalpine-8a8766c0b2117dbf64655ec62331319077c1b803.tar.xz
* Return some code used to sign messages. Apparently openssl is not
consistent in what it signs. Problem reported by Björn Krellner.
-rw-r--r--pith/pine.hlp2
-rw-r--r--pith/send.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/pith/pine.hlp b/pith/pine.hlp
index de38e61..51d0d00 100644
--- a/pith/pine.hlp
+++ b/pith/pine.hlp
@@ -140,7 +140,7 @@ with help text for the config screen and the composer that didn't have any
reasonable place to be called from.
Dummy change to get revision in pine.hlp
============= h_revision =================
-Alpine Commit 344 2019-05-25 17:53:29
+Alpine Commit 346 2019-06-03 11:10:47
============= h_news =================
<HTML>
<HEAD>
diff --git a/pith/send.c b/pith/send.c
index 32722a3..d4c01ab 100644
--- a/pith/send.c
+++ b/pith/send.c
@@ -4315,6 +4315,9 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s)
* they should expect weirdness. We do not add this when signing a
* message, though...
*/
+#ifdef SMIME
+ if(!ps_global->smime || !ps_global->smime->do_sign)
+#endif /* SMIME */
if(f && !(*f)(s, " This message is in MIME format. The first part should be readable text,\015\012 while the remaining parts are likely unreadable without MIME-aware tools.\015\012\015\012"))
return(0);
@@ -4340,7 +4343,11 @@ pine_rfc822_output_body(struct mail_bodystruct *body, soutr_t f, void *s)
/* output trailing cookie */
snprintf (t = tmp, sizeof(tmp), "--%s--",cookie);
tmp[sizeof(tmp)-1] = '\0';
-
+#ifdef SMIME
+ if(ps_global->smime && ps_global->smime->do_sign
+ && strlen(tmp) < sizeof(tmp)-2)
+ strncat(tmp, "\015\012", 2);
+#endif
if(lmc.so && !lmc.all_written){
so_puts(lmc.so, t);
so_puts(lmc.so, "\015\012");