SSL fixes.

client/mysql.cc:
  Some memory was unfreed :(
include/sslopt-case.h:
  Oh no, this typo made capath functionality unusable
vio/viossl.c:
  Want to debug timeout issues.
This commit is contained in:
unknown 2001-11-01 16:59:00 +02:00
parent d9dcb15b25
commit 28340acf02
3 changed files with 10 additions and 4 deletions

View File

@ -379,6 +379,13 @@ int main(int argc,char *argv[])
sig_handler mysql_end(int sig)
{
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
if (!status.batch && !quick && !opt_html && !opt_xml)
{

View File

@ -37,12 +37,11 @@
case OPT_SSL_CAPATH:
opt_use_ssl = 1; /* true */
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;
case OPT_SSL_CIPHER:
opt_use_ssl = 1; /* true */
my_free(opt_ssl_cipher, MYF(MY_ALLOW_ZERO_PTR));
opt_ssl_cipher = my_strdup(optarg, MYF(0));
break;
#endif

View File

@ -292,7 +292,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
report_errors();
DBUG_VOID_RETURN;
}
DBUG_PRINT("info", ("ssl_=%p",vio->ssl_));
DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
SSL_clear(vio->ssl_);
vio_blocking(vio, FALSE);
SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);
@ -348,7 +348,7 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* vio, long timeout)
report_errors();
DBUG_VOID_RETURN;
}
DBUG_PRINT("info",("ssl_=%p",vio->ssl_));
DBUG_PRINT("info", ("ssl_=%p timeout=%ld",vio->ssl_, timeout));
SSL_clear(vio->ssl_);
vio_blocking(vio, FALSE);
SSL_SESSION_set_timeout(SSL_get_session(vio->ssl_), timeout);