summaryrefslogtreecommitdiff
path: root/vio/viossl.c
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-11-18 17:56:49 +0100
committerSergei Golubchik <sergii@pisem.net>2014-11-18 17:56:49 +0100
commitc8fa6f782c9e3bc7ac83b36e486e9177fa9fa18c (patch)
tree0e467b71e9d75641d865c441a77be3d6146b4a28 /vio/viossl.c
parent302b50fa302589391084ce2426cd14f7a049a56d (diff)
downloadmariadb-git-c8fa6f782c9e3bc7ac83b36e486e9177fa9fa18c.tar.gz
improve OpenSSL error reporting
e.g. from "error:00000001:lib(0):func(0):reason(1)" to "error:140830B5:SSL routines:SSL3_CLIENT_HELLO:no ciphers available"
Diffstat (limited to 'vio/viossl.c')
-rw-r--r--vio/viossl.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/vio/viossl.c b/vio/viossl.c
index 60e663cacaf..fd5dfc51f17 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -26,6 +26,18 @@
#ifdef HAVE_OPENSSL
+#ifndef HAVE_YASSL
+/*
+ yassl seem to be different here, SSL_get_error() value can be
+ directly passed to ERR_error_string(), and these errors don't go
+ into ERR_get_error() stack.
+ in openssl, apparently, SSL_get_error() values live in a different
+ namespace, one needs to use ERR_get_error() as an argument
+ for ERR_error_string().
+*/
+#define SSL_get_error(X,Y) ERR_get_error()
+#endif
+
#ifndef DBUG_OFF
static void