diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-04-12 20:44:44 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-04-12 20:44:44 +0000 |
commit | 9fc8988add90dc2af4f81e1d9029bca923502e42 (patch) | |
tree | 9ba47c10749c4abb227c31679bbfa9121ad5b43d /ace/SSL/SSL_Context.cpp | |
parent | 844dbfc89759ae6d50b298694efaedd97ad7ff3b (diff) | |
download | ATCD-9fc8988add90dc2af4f81e1d9029bca923502e42.tar.gz |
ChangeLogTag:Wed Apr 12 13:34:46 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/SSL/SSL_Context.cpp')
-rw-r--r-- | ace/SSL/SSL_Context.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/ace/SSL/SSL_Context.cpp b/ace/SSL/SSL_Context.cpp index b9ac186721e..9af17e62e94 100644 --- a/ace/SSL/SSL_Context.cpp +++ b/ace/SSL/SSL_Context.cpp @@ -1,21 +1,20 @@ // -*- C++ -*- // $Id$ -// -// ======================================================================== +// ========================================================================== // // = LIBRARY -// ace +// ACE_SSL // // = FILENAME // SSL_Context.cpp // // = AUTHOR // Chris Zimman -// Carlos O'Ryan <coryan@ece.uciedu> -// Ossama Othman <ossama@ece.uci.du> +// Carlos O'Ryan <coryan@ece.uci.edu> +// Ossama Othman <ossama@ece.uci.edu> // -// ======================================================================== +// ========================================================================== #if defined (ACE_HAS_SSL) @@ -46,7 +45,7 @@ static const char rnd_seed[] = "string to make the random number generator think int ACE_SSL_Context::library_init_count_ = 0; -ACE_SSL_Context::ACE_SSL_Context () +ACE_SSL_Context::ACE_SSL_Context (void) : context_ (0), mode_ (-1), default_verify_mode_ (SSL_VERIFY_NONE) @@ -54,18 +53,19 @@ ACE_SSL_Context::ACE_SSL_Context () ACE_SSL_Context::ssl_library_init (); } -ACE_SSL_Context::~ACE_SSL_Context () +ACE_SSL_Context::~ACE_SSL_Context (void) { if (this->context_) { - ::SSL_CTX_free(this->context_); + ::SSL_CTX_free (this->context_); this->context_ = 0; } + ACE_SSL_Context::ssl_library_fini (); } void -ACE_SSL_Context::ssl_library_init () +ACE_SSL_Context::ssl_library_init (void) { ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_ssl_mon, @@ -112,7 +112,7 @@ ACE_SSL_Context::ssl_library_init () } void -ACE_SSL_Context::ssl_library_fini () +ACE_SSL_Context::ssl_library_fini (void) { ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex, ace_ssl_mon, @@ -130,6 +130,8 @@ ACE_SSL_Context::ssl_library_fini () delete [] ACE_SSL_Context::lock_; #endif /* ACE_HAS_THREADS */ + + ::EVP_cleanup (); } } @@ -227,6 +229,7 @@ ACE_SSL_Context::set_mode (int mode) // ACE_ERROR ((LM_ERROR, "Mismatch in key/certificate\n")); return -1; } + return 0; } |