Commit c4ec6bb6 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

"flush ssl" ASAN warnings with yassl

avoid calling SSL_get_verify_mode() and  SSL_get_verify_depth(),
since yassl implementation of the function accesses the acceptor context,
which can be freed on FLUSH SSL command.
parent 0ce7f6b0
...@@ -7551,18 +7551,6 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff, ...@@ -7551,18 +7551,6 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff,
return 0; return 0;
} }
static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope)
{
var->type= SHOW_LONG;
var->value= buff;
if( thd->vio_ok() && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg);
else
*((long *)buff)= 0;
return 0;
}
static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff, static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff,
enum enum_var_type scope) enum enum_var_type scope)
{ {
...@@ -7580,10 +7568,14 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff, ...@@ -7580,10 +7568,14 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff,
{ {
var->type= SHOW_LONG; var->type= SHOW_LONG;
var->value= buff; var->value= buff;
#ifndef HAVE_YASSL
if( thd->net.vio && thd->net.vio->ssl_arg ) if( thd->net.vio && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg); *((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg);
else else
*((long *)buff)= 0; *((long *)buff)= 0;
#else
*((long *)buff) = 0;
#endif
return 0; return 0;
} }
...@@ -7592,10 +7584,15 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff, ...@@ -7592,10 +7584,15 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff,
{ {
var->type= SHOW_LONG; var->type= SHOW_LONG;
var->value= buff; var->value= buff;
#ifndef HAVE_YASSL
if( thd->vio_ok() && thd->net.vio->ssl_arg ) if( thd->vio_ok() && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg); *((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg);
else else
*((long *)buff)= 0; *((long *)buff)= 0;
#else
*((long *)buff)= 0;
#endif
return 0; return 0;
} }
......
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