The original intention of that code (I wrote it a long time ago) was to
handle the more common cases where text could be fed in and converted to
the appropriate canonical form for S/MIME cleartext signing. Where
"text" could be LF or CRLF for EOL.

As such MAX_SMLEN (1024) was a value which would be expected to exceed
the line length of most text files.

As you point out there are cases which this can't handle with long line
lengths. There are other cases such as where a complex MIME document is
used and more elaborate canonicalisation is needed. In this case
PKCS7_BINARY should be used and the application should perform the
appropriate conversion.

The existing code could be fixed to handle other cases, for example by
dumping that BIO_gets() replacing with a BIO_read() loop and converting
the buffer in place. Alternatively a filter BIO that can handle EOL
conversion could be written.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to