summaryrefslogtreecommitdiff
path: root/vio/viosslfactories.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-05-25 22:00:14 +0300
committerunknown <monty@mysql.com>2004-05-25 22:00:14 +0300
commitb3851363ba8df0b3f55ecb358849a212db4b12a8 (patch)
tree2c56473da947b9807f0d1668171870a8e3dbc736 /vio/viosslfactories.c
parent699cbc02cc3eac51524a56fc106d013633f336f6 (diff)
downloadmariadb-git-b3851363ba8df0b3f55ecb358849a212db4b12a8.tar.gz
Added patches from Novell
Build-tools/Do-compile: Fixed indentation configure.in: Added patches from Novell Added C_EXTRA_FLAGS as an easy way to pass flags to both CFLAGS and CXXFLAGS extra/perror.c: Fixed error number reporting to not report 'Unknown error' include/my_global.h: Defines to make NETWARE patches cleaner include/thr_alarm.h: Fixed wrong macro netware/mysql_install_db.c: Indentation fix
Diffstat (limited to 'vio/viosslfactories.c')
-rw-r--r--vio/viosslfactories.c41
1 files changed, 39 insertions, 2 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c
index 0997e3909db..498d10da0ee 100644
--- a/vio/viosslfactories.c
+++ b/vio/viosslfactories.c
@@ -172,6 +172,35 @@ vio_verify_callback(int ok, X509_STORE_CTX *ctx)
}
+#ifdef __NETWARE__
+
+/* NetWare SSL cleanup */
+void netware_ssl_cleanup()
+{
+ /* free memory from SSL_library_init() */
+ EVP_cleanup();
+
+ /* free global X509 method */
+ X509_STORE_method_cleanup();
+
+ /* free the thread_hash error table */
+ ERR_free_state_table();
+}
+
+
+/* NetWare SSL initialization */
+static void netware_ssl_init()
+{
+ /* initialize OpenSSL library */
+ SSL_library_init();
+
+ /* cleanup OpenSSL library */
+ NXVmRegisterExitHandler(netware_ssl_cleanup, NULL);
+}
+
+#endif /* __NETWARE__ */
+
+
/************************ VioSSLConnectorFd **********************************/
/*
TODO:
@@ -188,7 +217,7 @@ new_VioSSLConnectorFd(const char* key_file,
int verify = SSL_VERIFY_NONE;
struct st_VioSSLConnectorFd* ptr;
int result;
- DH *dh=NULL;
+ DH *dh;
DBUG_ENTER("new_VioSSLConnectorFd");
DBUG_PRINT("enter",
("key_file=%s, cert_file=%s, ca_path=%s, ca_file=%s, cipher=%s",
@@ -202,6 +231,10 @@ new_VioSSLConnectorFd(const char* key_file,
ptr->ssl_method= 0;
/* FIXME: constants! */
+#ifdef __NETWARE__
+ netware_ssl_init();
+#endif
+
if (!ssl_algorithms_added)
{
DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()"));
@@ -279,7 +312,7 @@ new_VioSSLAcceptorFd(const char *key_file,
SSL_VERIFY_CLIENT_ONCE);
struct st_VioSSLAcceptorFd* ptr;
int result;
- DH *dh=NULL;
+ DH *dh;
DBUG_ENTER("new_VioSSLAcceptorFd");
DBUG_PRINT("enter",
("key_file=%s, cert_file=%s, ca_path=%s, ca_file=%s, cipher=%s",
@@ -292,6 +325,10 @@ new_VioSSLAcceptorFd(const char *key_file,
/* FIXME: constants! */
ptr->session_id_context= ptr;
+#ifdef __NETWARE__
+ netware_ssl_init();
+#endif
+
if (!ssl_algorithms_added)
{
DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()"));