summaryrefslogtreecommitdiff
path: root/ace/SSL/SSL_Context.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2001-09-28 16:49:21 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2001-09-28 16:49:21 +0000
commit2565eeb905366f97dc0225879e2e2cc507ddee94 (patch)
tree42e6f85df30c78533953695d4784eb532302168f /ace/SSL/SSL_Context.cpp
parent9636c522ccb5e86d8ee29fff541018e19e4be8a1 (diff)
downloadATCD-2565eeb905366f97dc0225879e2e2cc507ddee94.tar.gz
ChangeLogTag:Fri Sep 28 09:37:28 2001 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'ace/SSL/SSL_Context.cpp')
-rw-r--r--ace/SSL/SSL_Context.cpp29
1 files changed, 22 insertions, 7 deletions
diff --git a/ace/SSL/SSL_Context.cpp b/ace/SSL/SSL_Context.cpp
index 73cc9b67d2c..419bc00e790 100644
--- a/ace/SSL/SSL_Context.cpp
+++ b/ace/SSL/SSL_Context.cpp
@@ -201,9 +201,8 @@ ACE_SSL_Context::set_mode (int mode)
this->context_ = ::SSL_CTX_new (method);
if (this->context_ == 0)
{
-#ifndef ACE_NDEBUG
- ::ERR_print_errors_fp (stderr);
-#endif /* ACE_NDEBUG */
+
+
return -1;
}
@@ -223,10 +222,7 @@ ACE_SSL_Context::set_mode (int mode)
cert_file,
cert_dir) <= 0)
{
-#ifndef ACE_NDEBUG
- // @@ For some reason, this call causes a seg fault.
- // ::ERR_print_errors_fp (stderr);
-#endif /* ACE_NDEBUG */
+ ACE_SSL_Context::report_error ();
return -1;
}
@@ -328,6 +324,25 @@ ACE_SSL_Context::seed_file (const char * seed_file, long bytes)
return -1;
}
+void
+ACE_SSL_Context::report_error (unsigned long error_code)
+{
+ ACE_TCHAR error_string[256];
+
+ (void) ::ERR_error_string (error_code, error_string);
+
+ ACE_ERROR((LM_ERROR,
+ ACE_TEXT("SSL error: %u %s\n"),
+ error_code,
+ error_string));
+}
+
+void
+ACE_SSL_Context::report_error(void)
+{
+ ACE_SSL_Context::report_error (::ERR_get_error());
+}
+
// ****************************************************************