[openssl-users] Trouble with BIO_s_mem() and SSL_new() on OpenSSL-1.1.0-pre7-dev

Jim Carroll jim at carroll.com
Sat Aug 6 01:32:38 UTC 2016


We have a non-blocking windows app that we are migrating to from OpenSSL
1.0.2i to 1.1.0-pre7-dev. We move data from sockets to SSL via BIO_s_mem()
objects.

 

    rbio = BIO_new(BIO_s_mem());

    wbio = BIO_new(BIO_s_mem());

 

    ssl = SSL_new(ssl_ctx);

    SSL_set_bio(ssl, rbio, wbio);

 

We move data in via BIO_write(rbio, ...), but later an SSL_read(ssl, ...)
returns bytes -1 and SSL_get_error() returns SSL_ERROR(1)

 

Debug stepping through the code, we were surprised to discover that
ssl3_read_n() dispatched the SSL_read() into BIO_s_connect(). A detailed
study of the code, and I can assure that at no point do we ever associate
the windows socket with SSL.

 

Is it possible that that SSL_new() no longer allows the use of memory BIO's?
I know that's a long shot question, but we're grasping at straws here.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160805/b5b5de6d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4722 bytes
Desc: not available
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160805/b5b5de6d/attachment-0001.bin>


More information about the openssl-users mailing list