I think I found a bug in "openssl base64". When decoding an
encoded base64 steam which contains 0A, the value
0D is inserted before the 0A in the output base64
decoded stream. This seems like a carriage return insertion
problem. This was found when I took a .p12 file
that had a 1024 bit RSA public key in it which contained
0A in it. I converted the file to a .pem file using
-nodes. I then extracted the base64 private key portion,
and used "openssl base64" to decode this portion. This
was were I noticed the different public key (containing
the CR=0x0D). However, going straight to a .pem and back
to a .p12 doesn't change the public key, so the same
code is not being used. If this were the case, it most
certainly would have shown up in the openssl test scripts,
since a 1024 bit modulus is 128 bytes, and 0A shows up
with probability about 1 in every 256 RSA modulus bytes.
I used the program base64.exe from
http://www.fourmilab.ch/webtools/base64/base64.zip
and it decodes the public modulus just fine. So the problem
is not in the base64 encoding implementation. Could this be
an ANSI C cooked mode write to stdout?? I hope this
helps.
helps.
Adam Young
Lead Systems Engineer
Lockheed Martin
Get your FREE download of MSN Explorer at http://explorer.msn.com
______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
