summaryrefslogtreecommitdiffstats
path: root/apps/smime.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-05-19 17:22:57 +0100
committerDr. Stephen Henson <steve@openssl.org>2016-05-19 22:43:00 +0100
commit2197494da6a2f4b1cc7024bb647c775f277f53c5 (patch)
treea2dad59145200bddc550e347d684d9e62c3f385e /apps/smime.c
parent6c4be50a5d775866e79b2f58fafb23a862bd38b2 (diff)
Use correct EOL in headers.
RT#1817 Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/smime.c')
-rw-r--r--apps/smime.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/smime.c b/apps/smime.c
index ae1b017461..f9f3d23787 100644
--- a/apps/smime.c
+++ b/apps/smime.c
@@ -134,6 +134,7 @@ int smime_main(int argc, char **argv)
FORMAT_PEM;
int vpmtouched = 0, rv = 0;
ENGINE *e = NULL;
+ const char *mime_eol = "\n";
if ((vpm = X509_VERIFY_PARAM_new()) == NULL)
return 1;
@@ -224,6 +225,7 @@ int smime_main(int argc, char **argv)
break;
case OPT_CRLFEOL:
flags |= PKCS7_CRLFEOL;
+ mime_eol = "\r\n";
break;
case OPT_RAND:
inrand = opt_arg();
@@ -574,11 +576,11 @@ int smime_main(int argc, char **argv)
PEM_write_bio_PKCS7(out, p7);
else {
if (to)
- BIO_printf(out, "To: %s\n", to);
+ BIO_printf(out, "To: %s%s", to, mime_eol);
if (from)
- BIO_printf(out, "From: %s\n", from);
+ BIO_printf(out, "From: %s%s", from, mime_eol);
if (subject)
- BIO_printf(out, "Subject: %s\n", subject);
+ BIO_printf(out, "Subject: %s%s", subject, mime_eol);
if (outformat == FORMAT_SMIME) {
if (operation == SMIME_RESIGN)
rv = SMIME_write_PKCS7(out, p7, indata, flags);