On Sun, Oct 12, 2003, Cosmin wrote:

>I have a problem when trying to sign/encrypt. I noticed that only the headers
>have \r\n at the end of the lines (the base64 part has as eol only \n). In
>order to make it to work, now I'm replacing \n with \r\n, but it's not a good
>solution for big e-mails.
>For ex. when encrypting I call PKCS7_encrypt() with no flags and
>SMIME_write_PKCS7() with the PKCS7_CRLFEOL flag.
>I'm using the library on win32; I use as input a file BIO and as output a
>memory BIO.
 
>Do I need to call those functions with other flags or is this a known bug?

Its a known issue.

The program you use to mail the output of SMIME_write_PKCS7() shouldn't really
care what the EOL character is. However some do and other operations such as
opening the file as a .eml file also care about EOL. When I tested this it
didn't seem to matter what characters were in the signatue (base64) section:
just the headers and content.

Getting CR+LF in the signature section is a bit messy at the OpenSSL level, it
would require the additions of various flags in the base64 BIO and the
underlying encoder. This would break binary compatibility in the 0.9.7X series
which is why I didn't implement it there.

There's no reason something couldn't be done in 0.9.8 I just haven't got
round to it yet.

Steve.
--
Dr Stephen N. Henson.
Core developer of the   OpenSSL project: http://www.openssl.org/
Freelance consultant see: http://www.drh-consultancy.demon.co.uk/
Email addreses, PGP and S/MIME: see homepage.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to