mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
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
This commit is contained in:
@@ -8528,14 +8528,14 @@ static ulong parse_client_handshake_packet(MPVIO_EXT *mpvio,
|
||||
DBUG_PRINT("info", ("client capabilities: %lu", mpvio->client_capabilities));
|
||||
if (mpvio->client_capabilities & CLIENT_SSL)
|
||||
{
|
||||
char error_string[1024] __attribute__((unused));
|
||||
unsigned long errptr;
|
||||
|
||||
/* Do the SSL layering. */
|
||||
if (!ssl_acceptor_fd)
|
||||
return packet_error;
|
||||
|
||||
DBUG_PRINT("info", ("IO layer change in progress..."));
|
||||
if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout))
|
||||
if (sslaccept(ssl_acceptor_fd, net->vio, net->read_timeout, &errptr))
|
||||
{
|
||||
DBUG_PRINT("error", ("Failed to accept new SSL connection"));
|
||||
return packet_error;
|
||||
|
Reference in New Issue
Block a user