Reverse the change with the following log, it needs further investigation:
authorRichard Levitte <levitte@openssl.org>
Thu, 18 Jul 2002 10:39:20 +0000 (10:39 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 18 Jul 2002 10:39:20 +0000 (10:39 +0000)
Make S/MIME output conform with the mail and MIME standards.
PR: 151

apps/smime.c
crypto/pkcs7/pk7_mime.c

index 482bd18e4385788b61a3dd4bddbbc77437bae5d0..90fe026f567781d86445d240c0e3be6e63eebe4e 100644 (file)
@@ -530,9 +530,9 @@ int MAIN(int argc, char **argv)
        } else if(operation == SMIME_PK7OUT) {
                PEM_write_bio_PKCS7(out, p7);
        } else {
-               if(to) BIO_printf(out, "To: %s\r\n", to);
-               if(from) BIO_printf(out, "From: %s\r\n", from);
-               if(subject) BIO_printf(out, "Subject: %s\r\n", subject);
+               if(to) BIO_printf(out, "To: %s\n", to);
+               if(from) BIO_printf(out, "From: %s\n", from);
+               if(subject) BIO_printf(out, "Subject: %s\n", subject);
                if(outformat == FORMAT_SMIME) 
                        SMIME_write_PKCS7(out, p7, in, flags);
                else if(outformat == FORMAT_PEM) 
index d5fb9ec8a70fa44d928856724f91e9d0efbdc22e..5100c84b881aafb504e4e3035f0533678e99a32e 100644 (file)
@@ -164,34 +164,34 @@ int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
                        bound[i] = c;
                }
                bound[32] = 0;
-               BIO_printf(bio, "MIME-Version: 1.0\r\n");
+               BIO_printf(bio, "MIME-Version: 1.0\n");
                BIO_printf(bio, "Content-Type: multipart/signed;");
                BIO_printf(bio, " protocol=\"application/x-pkcs7-signature\";");
-               BIO_printf(bio, " micalg=sha1; boundary=\"----%s\"\r\n\r\n", bound);
+               BIO_printf(bio, " micalg=sha1; boundary=\"----%s\"\n\n", bound);
                BIO_printf(bio, "This is an S/MIME signed message\n\n");
                /* Now write out the first part */
                BIO_printf(bio, "------%s\r\n", bound);
-               if(flags & PKCS7_TEXT) BIO_printf(bio, "Content-Type: text/plain\r\n\r\n");
+               if(flags & PKCS7_TEXT) BIO_printf(bio, "Content-Type: text/plain\n\n");
                while((i = BIO_read(data, linebuf, MAX_SMLEN)) > 0) 
                                                BIO_write(bio, linebuf, i);
-               BIO_printf(bio, "\r\n------%s\r\n", bound);
+               BIO_printf(bio, "\n------%s\n", bound);
 
                /* Headers for signature */
 
-               BIO_printf(bio, "Content-Type: application/x-pkcs7-signature; name=\"smime.p7s\"\r\n");
-               BIO_printf(bio, "Content-Transfer-Encoding: base64\r\n");
-               BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7s\"\r\n\r\n");
+               BIO_printf(bio, "Content-Type: application/x-pkcs7-signature; name=\"smime.p7s\"\n");
+               BIO_printf(bio, "Content-Transfer-Encoding: base64\n");
+               BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7s\"\n\n");
                B64_write_PKCS7(bio, p7);
-               BIO_printf(bio,"\r\n------%s--\r\n\r\n", bound);
+               BIO_printf(bio,"\n------%s--\n\n", bound);
                return 1;
        }
        /* MIME headers */
-       BIO_printf(bio, "MIME-Version: 1.0\r\n");
-       BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7m\"\r\n");
-       BIO_printf(bio, "Content-Type: application/x-pkcs7-mime; name=\"smime.p7m\"\r\n");
-       BIO_printf(bio, "Content-Transfer-Encoding: base64\r\n\r\n");
+       BIO_printf(bio, "MIME-Version: 1.0\n");
+       BIO_printf(bio, "Content-Disposition: attachment; filename=\"smime.p7m\"\n");
+       BIO_printf(bio, "Content-Type: application/x-pkcs7-mime; name=\"smime.p7m\"\n");
+       BIO_printf(bio, "Content-Transfer-Encoding: base64\n\n");
        B64_write_PKCS7(bio, p7);
-       BIO_printf(bio, "\r\n");
+       BIO_printf(bio, "\n");
        return 1;
 }