On Wed, Dec 29, 2010, Markus Wernig wrote: > On 12/28/10 18:35, Dr. Stephen Henson wrote: > > > At around line 184 there is a longer line which seems to be confusing > > OpenSSL's base64 decoder. If you add a newline in there it seems to be OK. > > Yes, I noted that too. This also does the trick: > > # base64 -d encMsgNok.eml > encMsg.bin > # base64 encMsg.bin > encMsg.eml > > asn1parse and smime -decrypt happy again :-) > > PS: Actually, the reason seems to be (not having looked at the code) > that the base64 decoder of openssl enforces a maximum encoded line > length of 76, which seems to be derived from RFC 2045 (MIME), stripping > any character beyond position 76. Which of course would leave it with a > garbled DER structure afterwards ...
Yes the base64 decoder is a bit picky. It could do with rewriting to be more robust (it has been patched up several times over the years) and to include new functionality (e.g. so PEM headers can be streamed). Steve. -- Dr Stephen N. Henson. OpenSSL project core developer. Commercial tech support now available see: http://www.openssl.org ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org