Shutdown SSL on close.

This commit is contained in:
Jan Vidar Krey 2010-09-01 23:57:55 +02:00
parent 0190c38c32
commit 43375d8443
2 changed files with 4 additions and 0 deletions

View File

@ -662,6 +662,7 @@ static int load_ssl_certificates(struct hub_info* hub, struct hub_config* config
/* Disable SSLv2 */
SSL_CTX_set_options(hub->ssl_ctx, SSL_OP_NO_SSLv2);
SSL_CTX_set_quiet_shutdown(hub->ssl_ctx, 1);
if (SSL_CTX_use_certificate_file(hub->ssl_ctx, config->tls_certificate, SSL_FILETYPE_PEM) < 0)
{

View File

@ -181,7 +181,10 @@ void net_con_close(struct net_connection* con)
#ifdef SSL_SUPPORT
if (con->ssl)
{
SSL_shutdown(con->ssl);
SSL_clear(con->ssl);
}
#endif
net_close(con->sd);