« Return to Thread: Can't free BIO after ssl handshake fails

Can't free BIO after ssl handshake fails

by Roman Aspetsberger :: Rate this Message:

Reply to Author | View in Thread

Hello.

I have got a big problem in my application:

My application is connecting webservers over ssl. Therefore, I use a bio
chain bufferBIO -> sslBIO -> socketBIO. I use certificate verification,
but when a cert verification fails, I have a problem with freeing the
ssl BIO.
My thread is hanging at BIO_free(serverTlsBIO) with full CPU load. But
if I don't free the ssl BIO, I have a big memory leak. The interesting
thing is, that this doesen't happen always, but always with the same
websites/certificates.

if (BIO_do_handshake(serverTlsBIO) <= 0)
{
        BIO_pop(serverTlsBIO);
        BIO_free(serverTlsBIO);
        return TLS_SERVER_HANDSHAKE_ERR;
}

Has anyone a solution or is anything wrong in my consideration?

Thanks in advance,
Roman

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@...
Automated List Manager                           majordomo@...

 « Return to Thread: Can't free BIO after ssl handshake fails