Commit 24805fc7 authored by tonu@volk.internalnet's avatar tonu@volk.internalnet

SSL fixes.

parent f77c684b
...@@ -379,6 +379,13 @@ int main(int argc,char *argv[]) ...@@ -379,6 +379,13 @@ int main(int argc,char *argv[])
sig_handler mysql_end(int sig) sig_handler mysql_end(int sig)
{ {
mysql_close(&mysql); mysql_close(&mysql);
#ifdef HAVE_OPENSSL
my_free(opt_ssl_key,MYF(MY_ALLOW_ZERO_PTR));
my_free(opt_ssl_cert,MYF(MY_ALLOW_ZERO_PTR));
my_free(opt_ssl_ca,MYF(MY_ALLOW_ZERO_PTR));
my_free(opt_ssl_capath,MYF(MY_ALLOW_ZERO_PTR));
my_free(opt_ssl_cipher,MYF(MY_ALLOW_ZERO_PTR));
#endif
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
if (!status.batch && !quick && !opt_html && !opt_xml) if (!status.batch && !quick && !opt_html && !opt_xml)
{ {
......
...@@ -37,12 +37,11 @@ ...@@ -37,12 +37,11 @@
case OPT_SSL_CAPATH: case OPT_SSL_CAPATH:
opt_use_ssl = 1; /* true */ opt_use_ssl = 1; /* true */
my_free(opt_ssl_ca, MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_ssl_ca, MYF(MY_ALLOW_ZERO_PTR));
opt_ssl_ca = my_strdup(optarg, MYF(0)); opt_ssl_capath = my_strdup(optarg, MYF(0));
break; break;
case OPT_SSL_CIPHER: case OPT_SSL_CIPHER:
opt_use_ssl = 1; /* true */ opt_use_ssl = 1; /* true */
my_free(opt_ssl_cipher, MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
opt_ssl_cipher = my_strdup(optarg, MYF(0)); opt_ssl_cipher = my_strdup(optarg, MYF(0));
break; break;
#endif #endif
...@@ -292,7 +292,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout) ...@@ -292,7 +292,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
report_errors(); report_errors();
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
DBUG_PRINT("info", ("ssl_=%p",vio->ssl_)); DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
SSL_clear(vio->ssl_); SSL_clear(vio->ssl_);
vio_blocking(vio, FALSE); vio_blocking(vio, FALSE);
SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);
...@@ -348,7 +348,7 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout) ...@@ -348,7 +348,7 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
report_errors(); report_errors();
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
DBUG_PRINT("info",("ssl_=%p",vio->ssl_)); DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
SSL_clear(vio->ssl_); SSL_clear(vio->ssl_);
vio_blocking(vio, FALSE); vio_blocking(vio, FALSE);
SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout); SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment