Unless you have a specific reason to use BIOs, you can do a regular accept() and use the socket and sockaddr_in from its return. Do whatever you want with the sockaddr_in. The socket returned by accept() is input to the SSL_set_fd to associate it with an SSL from SSL_new(). Then later, you would do an SSL_accept(SSL) to satisfy the expected client SSL_connect().
In my own application, which added SSL over top of (or should I say underneath) an existing application protocol, we do a lot of system call work before we figure out that SSL should be involved. When we figure that out, it is simple to glue the socket to the SSL and keep going with SSL taking over from there. FWIW. Dave McLellan - Consulting Software Engineer EMC Corporation 228 South St. Hopkinton MA 01748 phone: 508-249-1257 fax 508-497-8030 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joe Santapau Sent: Sunday, June 26, 2005 2:11 PM To: openssl-users@openssl.org Subject: Getting sockaddr_in structures from a BIO or SSL struct. Hello All, Is there a way in the OpenSSL API that allows you to save connection information from a BIO_do_accept() on a socket like accept() does ?, specifically a sockaddr_in structure, or similar. If not, I am going to try to populate a BIO or SSL structure using information from a standard accept() call and then use the API to populate a BIO for the completetion of an SSL_accept(), is this safe ? caveats ? Thanks All, ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]