Richard Levitte - VMS Whacker wrote:
> 
> 
> rsalz> > Also, have you looked at bio/bss_fd.c?
> rsalz>
> rsalz> Sure, but the issue is what OpenSSL uses interally, as I hope
> rsalz> my example showed.
> 
> Oh, absolutely.  What I wanted to point out is that there is a BIO
> that uses file descriptors, which makes the need for a flag to
> bss_file.c completely needless and one complication too many.  To
> solve said problem, one should use the file descriptor BIO instead of
> the stream BIO...
> 

fd BIOs aren't quite the same as stream BIOs since they don't support
BIO_gets(). That can be remedied by prepending a buffering BIO.

I agree though that some of the handling is a mess. The apps mix and
match stdio and BIOs seemingly at random.

One extreme example of weirdness is WinCE. Older versions didn't support
stdio or fds. Newer versions support stdio but not fds (well there's no
open/read/write anyway) but stdio using stdin, stdout and stderr doesn't
always work since on some platforms have no console.

Handling such an environment can be painful when OpenSSL mixes its I/O
in this way. Even when you've done all that lot you find that there's
still the oddball case of passphrase entry which uses platform specific
code hidden away in the DES library of all places.

IMHO we should ideally have console and file I/O all handled by BIOs in
such a way that any platform specific changes only need to be made in
one place.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.


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

Reply via email to