On Thu, Jul 18, 2002 at 10:47:36AM +0200, [EMAIL PROTECTED] wrote:
> Log: > Make S/MIME output conform with the mail and MIME standards. > PR: 151 > - 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(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); [etc.] I think this is wrong. The output file is opened in text mode (not binary), so on systems where line ends are usually CRLF, the "\r\n" will result in CR CR LF sequences because "\n" is converted into CRLF by the system library. On systems where line ends are usually LF, this is conventionally used for e-mail messages even though in theory line ends should by CRLF. CRLF is almost exclusively used in network protocols such as SMTP, not for stored files. Look at sendmail, postfix, qmail and any of the usual mail readers. 'openssl smime' should stick to this convention. [There's a complication about using LFs for CRLFs: Nested text messages must be treated as if they were in CRLF format when they are encrypted or signed even when actually only LFs are used in the stored files. SMIME_crlf_copy() takes care of this, so the CRLF handling for S/MIME in OpenSSL appears to have been OK before this patch.] -- Bodo M�ller <[EMAIL PROTECTED]> PGP http://www.informatik.tu-darmstadt.de/TI/Mitarbeiter/moeller/0x36d2c658.html * TU Darmstadt, Theoretische Informatik, Alexanderstr. 10, D-64283 Darmstadt * Tel. +49-6151-16-6628, Fax +49-6151-16-6036 ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
