summaryrefslogtreecommitdiff
path: root/sql/sql_acl.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2003-06-26 12:47:36 +0500
committerunknown <gluh@gluh.mysql.r18.ru>2003-06-26 12:47:36 +0500
commita61b679d3e6f4f5d4634a883ce3b4e4c7a722758 (patch)
tree1cba43db3b6011169f56cf4992aa49eca9167fdf /sql/sql_acl.cc
parent4eef86c60b0439eb612c2d3ab764c10f8e6cd0c1 (diff)
downloadmariadb-git-a61b679d3e6f4f5d4634a883ce3b4e4c7a722758.tar.gz
Fix bug #673: MySQL 4.0.13 no SSL connection with mysql client possible
sql/sql_acl.cc: Fix bug #673 MySQL 4.0.13 no SSL connection with mysql client possible vio/viossl.c: Fix bug #673 MySQL 4.0.13 no SSL connection with mysql client possible vio/viosslfactories.c: Fix bug #673 MySQL 4.0.13 no SSL connection with mysql client possible
Diffstat (limited to 'sql/sql_acl.cc')
-rw-r--r--sql/sql_acl.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index f01248bb682..72c8d4aaf38 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -546,7 +546,9 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
We need to check for absence of SSL because without SSL
we should reject connection.
*/
- if (vio_type(vio) == VIO_TYPE_SSL && SSL_get_peer_certificate(vio->ssl_))
+ if (vio_type(vio) == VIO_TYPE_SSL &&
+ SSL_get_verify_result(vio->ssl_) == X509_V_OK &&
+ SSL_get_peer_certificate(vio->ssl_))
user_access=acl_user->access;
break;
case SSL_TYPE_SPECIFIED: /* Client should have specified attrib */
@@ -554,7 +556,8 @@ ulong acl_getroot(THD *thd, const char *host, const char *ip, const char *user,
We need to check for absence of SSL because without SSL
we should reject connection.
*/
- if (vio_type(vio) == VIO_TYPE_SSL)
+ if (vio_type(vio) == VIO_TYPE_SSL &&
+ SSL_get_verify_result(vio->ssl_) == X509_V_OK)
{
if (acl_user->ssl_cipher)
{