summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStaale Smedseng <staale.smedseng@sun.com>2009-07-23 13:38:11 +0200
committerStaale Smedseng <staale.smedseng@sun.com>2009-07-23 13:38:11 +0200
commit63ab8415d907d105d2468a250c07b7c4214cb141 (patch)
treeae934dbe79d541f8b08519e804ac93753ee40498 /include
parent7fff3efb46a733621ca63b0ec2bb590c12ad8856 (diff)
downloadmariadb-git-63ab8415d907d105d2468a250c07b7c4214cb141.tar.gz
Bug #45770 errors reading server SSL files are printed, but
not logged Errors encountered during initialization of the SSL subsystem are printed to stderr, rather than to the error log. This patch adds a parameter to several SSL init functions to report the error (if any) out to the caller. The function init_ssl() in mysqld.cc is moved after the initialization of the log subsystem, so that any error messages can be logged to the error log. Printing of messages to stderr has been retained to get diagnostic output in a client context.
Diffstat (limited to 'include')
-rw-r--r--include/violite.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/violite.h b/include/violite.h
index 7b57667541a..b04fe108314 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -109,6 +109,14 @@ typedef my_socket YASSL_SOCKET_T;
#include <openssl/ssl.h>
#include <openssl/err.h>
+enum enum_ssl_init_error
+{
+ SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
+ SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
+ SSL_INITERR_MEMFAIL, SSL_INITERR_LASTERR
+};
+const char* sslGetErrString(enum enum_ssl_init_error err);
+
struct st_VioSSLFd
{
SSL_CTX *ssl_context;
@@ -124,7 +132,7 @@ struct st_VioSSLFd
struct st_VioSSLFd
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
const char *ca_file,const char *ca_path,
- const char *cipher);
+ const char *cipher, enum enum_ssl_init_error* error);
#endif /* HAVE_OPENSSL */
#ifdef HAVE_SMEM