Skip to content
Permalink
Browse files
"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.
  • Loading branch information
vaintroub committed Dec 27, 2018
1 parent 0ce7f6b commit c4ec6bb
Showing 1 changed file with 9 additions and 12 deletions.
@@ -7551,18 +7551,6 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff,
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,
enum enum_var_type scope)
{
@@ -7580,10 +7568,14 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff,
{
var->type= SHOW_LONG;
var->value= buff;
#ifndef HAVE_YASSL
if( thd->net.vio && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg);
else
*((long *)buff)= 0;
#else
*((long *)buff) = 0;
#endif
return 0;
}

@@ -7592,10 +7584,15 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff,
{
var->type= SHOW_LONG;
var->value= buff;
#ifndef HAVE_YASSL
if( thd->vio_ok() && thd->net.vio->ssl_arg )
*((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg);
else
*((long *)buff)= 0;
#else
*((long *)buff)= 0;
#endif

return 0;
}

0 comments on commit c4ec6bb

Please sign in to comment.