[openssl-users] SSL_shutdown:shutdown while in init
chris.bare at gmail.com
Tue Oct 17 20:27:31 UTC 2017
I have the following code:
setup_ssl (char *server_name, char *port, SSL_CTX *ctx)
BIO *output = BIO_new_ssl_connect (ctx);
BIO_get_ssl (output, &ssl);
SSL_set_mode (ssl, SSL_MODE_AUTO_RETRY);
SSL_set_verify (ssl, true, NULL);
BIO_set_conn_hostname (output, server_name);
if (BIO_do_connect (output) <= 0)
If the server I'm trying to connect to does not have ssl enabled, I get the
and BIO_do_connect fails as expected, but BIO_free gives this error:
SSL_shutdown:shutdown while in init
If I don't free it, I have a memory leak.
Is there something else I need to do to clean up the BIO?
I tried calling BIO_do_handshake, but that crashes (not surprised).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users