diff options
Diffstat (limited to 'vio/viosslfactories.c')
-rw-r--r-- | vio/viosslfactories.c | 59 |
1 files changed, 11 insertions, 48 deletions
diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 9f689bf7c86..55cd7ba24bb 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -1,5 +1,4 @@ -/* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -12,8 +11,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "vio_priv.h" @@ -149,36 +147,6 @@ vio_set_cert_stuff(SSL_CTX *ctx, const char *cert_file, const char *key_file, } -#ifdef __NETWARE__ - -/* NetWare SSL cleanup */ -void netware_ssl_cleanup() -{ - /* free memory from SSL_library_init() */ - EVP_cleanup(); - -/* OpenSSL NetWare port specific functions */ -#ifndef HAVE_YASSL - - /* free global X509 method */ - X509_STORE_method_cleanup(); - - /* free the thread_hash error table */ - ERR_free_state_table(); -#endif -} - - -/* NetWare SSL initialization */ -static void netware_ssl_init() -{ - /* cleanup OpenSSL library */ - NXVmRegisterExitHandler(netware_ssl_cleanup, NULL); -} - -#endif /* __NETWARE__ */ - - static void check_ssl_init() { if (!ssl_algorithms_added) @@ -189,10 +157,6 @@ static void check_ssl_init() } -#ifdef __NETWARE__ - netware_ssl_init(); -#endif - if (!ssl_error_strings_loaded) { ssl_error_strings_loaded= TRUE; @@ -204,7 +168,7 @@ static void check_ssl_init() static struct st_VioSSLFd * new_VioSSLFd(const char *key_file, const char *cert_file, const char *ca_file, const char *ca_path, - const char *cipher, my_bool is_client_method, + const char *cipher, my_bool is_client_method, enum enum_ssl_init_error* error) { DH *dh; @@ -232,7 +196,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, *error= SSL_INITERR_MEMFAIL; DBUG_PRINT("error", ("%s", sslGetErrString(*error))); report_errors(); - my_free((void*)ssl_fd,MYF(0)); + my_free(ssl_fd); DBUG_RETURN(0); } @@ -248,7 +212,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, DBUG_PRINT("error", ("%s", sslGetErrString(*error))); report_errors(); SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); + my_free(ssl_fd); DBUG_RETURN(0); } @@ -265,7 +229,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, sslGetErrString(*error))); report_errors(); SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); + my_free(ssl_fd); DBUG_RETURN(0); } @@ -276,7 +240,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, DBUG_PRINT("error", ("%s", sslGetErrString(*error))); report_errors(); SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); + my_free(ssl_fd); DBUG_RETURN(0); } } @@ -286,7 +250,7 @@ new_VioSSLFd(const char *key_file, const char *cert_file, DBUG_PRINT("error", ("vio_set_cert_stuff failed")); report_errors(); SSL_CTX_free(ssl_fd->ssl_context); - my_free((void*)ssl_fd,MYF(0)); + my_free(ssl_fd); DBUG_RETURN(0); } @@ -305,11 +269,10 @@ new_VioSSLFd(const char *key_file, const char *cert_file, struct st_VioSSLFd * new_VioSSLConnectorFd(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) { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; - enum enum_ssl_init_error dummy; /* Turn off verification of servers certificate if both @@ -319,7 +282,7 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, verify= SSL_VERIFY_NONE; if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, - ca_path, cipher, TRUE, &dummy))) + ca_path, cipher, TRUE, error))) { return 0; } @@ -366,6 +329,6 @@ new_VioSSLAcceptorFd(const char *key_file, const char *cert_file, void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd) { SSL_CTX_free(fd->ssl_context); - my_free((uchar*) fd, MYF(0)); + my_free(fd); } #endif /* HAVE_OPENSSL */ |