diff options
author | Michael Widenius <monty@askmonty.org> | 2010-01-29 12:42:31 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-01-29 12:42:31 +0200 |
commit | 4847e50ddb2cf37f8edb627f38be757634605186 (patch) | |
tree | f3d5715eff66360dbc2f66104bccd057c8228e0e /vio/viossl.c | |
parent | a0417475678013914fb91c44be279b4107e3ffdb (diff) | |
parent | 89b1bb0be8c59eaf77e17e3e51ee9252e76e5c1d (diff) | |
download | mariadb-git-4847e50ddb2cf37f8edb627f38be757634605186.tar.gz |
Changed version number from RC to stable
Fixed bug in Yassle to get correct error messages in case of errors
Provide better error messages in case of ssl connect failure
Updated out-of-date ssl certificates to fix failing mysql-test-system (certificates now active for 10 years)
Fixed bug in query_cache that could cause asserts and hangs in DEBUG builds.
Fixed bug where one connection did not see changes done by another connection.
configure.in:
Changed version number from RC to stable
extra/yassl/src/yassl_error.cpp:
Fixed bug in Yassle to get correct error messages in case of errors
- 'error' is an enum that hold more error numbers than the enum was defined for
include/violite.h:
Added error output string for sslaccept() and sslconnect() to get reason for connect failure
mysql-test/mysql-test-run.pl:
Write failed test cases if mysql-test-run fails because of too many errors
mysql-test/r/grant.result:
Update results to reflect new certificates
mysql-test/r/openssl_1.result:
Update results to reflect new certificates
mysql-test/std_data/cacert.pem:
Update ssl certificate
mysql-test/std_data/client-cert.pem:
Update ssl certificate
mysql-test/std_data/client-key.pem:
Update ssl certificate
mysql-test/std_data/server-cert.pem:
Update ssl certificate
mysql-test/std_data/server-key.pem:
Update ssl certificate
mysql-test/t/grant.test:
Update test to reflect new certificates
mysql-test/t/openssl_1.test:
Update test to reflect new certificates
mysql-test/t/query_cache_debug.test:
Remove 'big_test' as test is now fast
sql-common/client.c:
Give a better error message if ssl connect fails
sql/net_serv.cc:
Fixed compiler warnings
sql/slave.cc:
Give a better error message in logs if ssl connect fails
sql/sql_cache.cc:
debug_wait_for_kill() now removes the set watch variable after kill signal
This is needed as invalidate_table() may be called twice for one query.
Ensure that net->query_cache_query is reset after query. This fixes assert in
query_cache_end_of_result() if query_cache_query holds results from previous query.
Removed DBUG_ASSERT(0), as this code can be run by query_cache_debug.test
sql/sql_connect.cc:
Give a better error message if ssl connect fails
sql/sql_parse.cc:
Fixed bug where one connection did not see changes done by another connection.
For statements that changes tables, close_thread_tables() MUST be called before
sending OK as a table handler may not make the changes available for other connections
before unlock_tables().
vio/viossl.c:
Give a better error message if ssl connect fails
Diffstat (limited to 'vio/viossl.c')
-rw-r--r-- | vio/viossl.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/vio/viossl.c b/vio/viossl.c index 0651fd8b7a3..c7449c7feb2 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -74,8 +74,11 @@ report_errors(SSL* ssl) } if (ssl) - DBUG_PRINT("error", ("error: %s", - ERR_error_string(SSL_get_error(ssl, l), buf))); + { + int error= SSL_get_error(ssl, l); + DBUG_PRINT("error", ("error: %s (%d)", + ERR_error_string(error, buf), error)); + } DBUG_PRINT("info", ("socket_errno: %d", socket_errno)); DBUG_VOID_RETURN; @@ -174,16 +177,17 @@ void vio_ssl_delete(Vio *vio) static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, - int (*connect_accept_func)(SSL*)) + int (*connect_accept_func)(SSL*), char *error_string) { SSL *ssl; my_bool unused; my_bool was_blocking; - DBUG_ENTER("ssl_do"); DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx", (long) ptr, vio->sd, (long) ptr->ssl_context)); + error_string[0]= 0; + /* Set socket to blocking if not already set */ vio_blocking(vio, 1, &was_blocking); @@ -191,6 +195,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, { DBUG_PRINT("error", ("SSL_new failure")); report_errors(ssl); + strmov(error_string, "SSL_new failed"); vio_blocking(vio, was_blocking, &unused); DBUG_RETURN(1); } @@ -203,6 +208,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, { DBUG_PRINT("error", ("SSL_connect/accept failure")); report_errors(ssl); + ERR_error_string(SSL_get_error(ssl, 0), error_string); SSL_free(ssl); vio_blocking(vio, was_blocking, &unused); DBUG_RETURN(1); @@ -250,17 +256,19 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, } -int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout) +int sslaccept(struct st_VioSSLFd *ptr, Vio *vio, long timeout, + char *error_string) { DBUG_ENTER("sslaccept"); - DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept)); + DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_accept, error_string)); } -int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout) +int sslconnect(struct st_VioSSLFd *ptr, Vio *vio, long timeout, + char *error_string) { DBUG_ENTER("sslconnect"); - DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect)); + DBUG_RETURN(ssl_do(ptr, vio, timeout, SSL_connect, error_string)); } |