summaryrefslogtreecommitdiff
path: root/vio/test-sslserver.c
diff options
context:
space:
mode:
authorTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-05-19 10:47:43 +0100
committerTatjana Azundris Nuernberg <tatjana.nuernberg@oracle.com>2011-05-19 10:47:43 +0100
commitcf80c6cb642d5f82a53f38a41742c94a2c768dbf (patch)
treed077b2f692ced3f83d965153a609265891c06dda /vio/test-sslserver.c
parent47f7fc4353f4ee665b703bee6479ad1664db0f48 (diff)
downloadmariadb-git-cf80c6cb642d5f82a53f38a41742c94a2c768dbf.tar.gz
Bug#11745920/Bug#21287: "SSL connection error" is not helpful! (ssl-verify-server-cert=true vs localhos)
SSL errors on client and now more specific to aid end-user with debugging. Also restructures error handling for compliance with SSL docs. include/violite.h: new_VioSSLConnectorFd/sslaccept/sslconnect return more elaborate status libmysql/errmsg.c: SSL errors now extended, more specific mysql-test/r/openssl_1.result: SSL errors now extended, more specific sql-common/client.c: Do more detailed error reporting for setup, connect, and server cert verifying phases. sql/sql_acl.cc: sslaccept() signature has changed vio/viossl.c: Save the error code and return it to callers of sslaccept and sslconnect. vio/viosslfactories.c: new_VioSSLConnectorFd(): return error code to caller
Diffstat (limited to 'vio/test-sslserver.c')
-rw-r--r--vio/test-sslserver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/vio/test-sslserver.c b/vio/test-sslserver.c
index 3123a4def2c..35cfa26bd00 100644
--- a/vio/test-sslserver.c
+++ b/vio/test-sslserver.c
@@ -52,6 +52,7 @@ do_ssl_stuff( TH_ARGS* args)
const char* s = "Huhuhuhuuu";
Vio* server_vio;
int err;
+ unsigned long ssl_error;
DBUG_ENTER("do_ssl_stuff");
server_vio = vio_new(args->sd, VIO_TYPE_TCPIP, TRUE);
@@ -60,7 +61,7 @@ do_ssl_stuff( TH_ARGS* args)
/* TCP connection is ready. Do server side SSL. */
err = write(server_vio->sd,(uchar*)s, strlen(s));
- sslaccept(args->ssl_acceptor,server_vio,60L);
+ sslaccept(args->ssl_acceptor,server_vio,60L,&ssl_error);
err = server_vio->write(server_vio,(uchar*)s, strlen(s));
DBUG_VOID_RETURN;
}