In message <[EMAIL PROTECTED]>
on Wed, 11 Jun 2003 09:21:49 +0200 (METDST),
I ("Charles B Cranston via RT" <[EMAIL PROTECTED]>) said:> Possible bug in OpenSSL 0.9.6h on Solaris 2.8 with /dev/urandom > The rsa command fails strangely when attempting to use > both -passin fd:<int> and -passout fd:<int> together. Richard Levitte - VMS Whacker via RT wrote: > I'm surprised that you don't get an error like this: > Error reading password from BIO > The reason is that fds can't really work, because BIO_gets() is used, > and is not implemented for fds (which is a bug in our code). The strange thing is that it "almost" works! I went back and tested the two "corner cases" (one passphrase via fd: other via file://dev/fd). If it were just a shared buffer one would expect these to still work, but both cases fail. In one case it fails to decrypt, as in the bug report submitted. In the other case it encrypts with a bad passphrase (at least, no attempt to decrypt the output file succeeds :-) which is also the error mode I saw in the production code. The only time I've ever seen "Error reading password from BIO" is when an empty file or fd gets used, that is, when the first read would get an end of file. But it's been in production for months and just using the fd: to supply a -passin passphrase without the -des3 or -passout (which the code does if the user requests her private key WITHOUT any security encryption) works with no problems. BTW the problem is strongly dependant on the actual choice of passphrase or at least the length. I had been testing it with easy to type passphrases of aaaaa and bbbbb and ccccc and it was not until I lengthened one passphrase to 12 (or was it 10?) characters that the problem showed up. I never got it to break when the length of the two passphrases was the same. If this helps in debug. One could modify that Perl script to first do an encryption with a test pass phrase on a file supplied in unencrypted form, then decrypt it, and be able to easily test with different pass phrases. In fact, if the script were modified to do a fork/exec it would be even closer to the production code that I am trying to make work. Does this mean I should go back and revisit my other code that uses fd: or is this problem limited to just the rsa subprogram? -- Charles B (Ben) Cranston mailto: [EMAIL PROTECTED] http://www.wam.umd.edu/~zben ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
