From 69a5dd196cc89c690b3531b75bb77f9c4a048b50 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Nov 2002 12:05:58 +0400 Subject: Error code for ssl connection Fix bug when server hang(with SSL, with modified libmysql) Add options master-ssl-capath and master-ssl-cipher Add some error checking(SSL) include/errmsg.h: Error code for SSL connection include/violite.h: Change return value in sslaccept Remove unused variable open_ libmysql/errmsg.c: Add client side descriptive message when ssl handshake fail libmysql/libmysql.c: Add ssl error code Add proper error checking sql/mysqld.cc: Add options master-ssl-capath and master-ssl-cipher sql/sql_parse.cc: Add error checking after sslaccept vio/viossl.c: Add ssl handshake error cheking vio/viosslfactories.c: Change error description when using wrong key or certificate --- sql/sql_parse.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/sql_parse.cc') diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index bdc6ab16a0e..2e718dd8d6a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -554,7 +554,13 @@ check_connections(THD *thd) { /* Do the SSL layering. */ DBUG_PRINT("info", ("IO layer change in progress...")); - sslaccept(ssl_acceptor_fd, net->vio, thd->variables.net_wait_timeout); + if (sslaccept(ssl_acceptor_fd, net->vio, thd->variables.net_wait_timeout)) + { + DBUG_PRINT("error", ("Failed to read user information (pkt_len= %lu)", + pkt_len)); + inc_host_errors(&thd->remote.sin_addr); + return(ER_HANDSHAKE_ERROR); + } DBUG_PRINT("info", ("Reading user information over SSL layer")); if ((pkt_len=my_net_read(net)) == packet_error || pkt_len < NORMAL_HANDSHAKE_SIZE) -- cgit v1.2.1