summaryrefslogtreecommitdiff
path: root/libmysql/libmysql.c
diff options
context:
space:
mode:
Diffstat (limited to 'libmysql/libmysql.c')
-rw-r--r--libmysql/libmysql.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index c1d8dd6283f..c9fb2f84a3c 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -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 */