1
0
mirror of https://github.com/MariaDB/server.git synced 2025-06-12 01:53:02 +03:00

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
This commit is contained in:
unknown
2002-11-05 12:05:58 +04:00
parent f6b9a33fb6
commit 69a5dd196c
8 changed files with 77 additions and 24 deletions

View File

@ -1872,15 +1872,18 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
options->ssl_capath,
options->ssl_cipher)))
{
/* TODO: Change to SSL error */
net->last_errno= CR_SERVER_LOST;
net->last_errno= CR_SSL_CONNECTION_ERROR;
strmov(net->last_error,ER(net->last_errno));
goto error;
}
DBUG_PRINT("info", ("IO layer change in progress..."));
/* TODO: Add proper error checking here, with return error message */
sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd),
mysql->net.vio, (long) (mysql->options.connect_timeout));
if(sslconnect((struct st_VioSSLConnectorFd*)(mysql->connector_fd),
mysql->net.vio, (long) (mysql->options.connect_timeout)))
{
net->last_errno= CR_SSL_CONNECTION_ERROR;
strmov(net->last_error,ER(net->last_errno));
goto error;
}
DBUG_PRINT("info", ("IO layer change done!"));
}
#endif /* HAVE_OPENSSL */