Commit d8e425c2 authored by unknown's avatar unknown

Fix for bug #1855: mysqld crashes with certain SSL connections

parent c61d96d5
...@@ -588,6 +588,11 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user, ...@@ -588,6 +588,11 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
/* Prepare certificate (if exists) */ /* Prepare certificate (if exists) */
DBUG_PRINT("info",("checkpoint 1")); DBUG_PRINT("info",("checkpoint 1"));
X509* cert=SSL_get_peer_certificate(ssl); X509* cert=SSL_get_peer_certificate(ssl);
if (!cert)
{
user_access=NO_ACCESS;
break;
}
DBUG_PRINT("info",("checkpoint 2")); DBUG_PRINT("info",("checkpoint 2"));
/* If X509 issuer is speified, we check it... */ /* If X509 issuer is speified, we check it... */
if (acl_user->x509_issuer) if (acl_user->x509_issuer)
......
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