On Fri, Jul 20, 2001 at 11:05:55AM +0200, Ohrt, Anders wrote:
> I'm doing a little hack reading RSA-keys from a network socket. I'm using
> openssl, (0.9.6a) and am some problems setting things up. What I want is
> just to listen to a port, read a key from it, and play with it then. I'm
> using a BIO, and if I use BIO_read, I get the key, but using
> PEM_read_RSAPrivateKey gives me BIO_gets: unsupported method. So, I though
> I'd add a buffer-bio (bio->next_bio = BIO_new (BIO_f_buffer())), but that
> made my program think it got a connection when it didn't...
Did you try
BIO *io;
io=BIO_new(BIO_f_buffer());
BIO_push(io,network_bio);
and than read from "io"? It does a bit more than just setting next_bio.
You may also consider to first connect to the network and only than
add the buffering layer...
Best regards,
Lutz
--
Lutz Jaenicke [EMAIL PROTECTED]
BTU Cottbus http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]