diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-04-25 18:25:05 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-04-25 18:25:05 +0000 |
commit | 8399fc0295b7c1e00de0c57604d355ea20887d2c (patch) | |
tree | 9b581d27da5a6ff0a9e187b972db4c0b69f7a209 /cpp/src/IceSSL/Instance.cpp | |
parent | adding generated directory (diff) | |
download | ice-8399fc0295b7c1e00de0c57604d355ea20887d2c.tar.bz2 ice-8399fc0295b7c1e00de0c57604d355ea20887d2c.tar.xz ice-8399fc0295b7c1e00de0c57604d355ea20887d2c.zip |
minor cleanup in IceSSL
Diffstat (limited to 'cpp/src/IceSSL/Instance.cpp')
-rw-r--r-- | cpp/src/IceSSL/Instance.cpp | 57 |
1 files changed, 2 insertions, 55 deletions
diff --git a/cpp/src/IceSSL/Instance.cpp b/cpp/src/IceSSL/Instance.cpp index 3dfa02a639c..716b0102392 100644 --- a/cpp/src/IceSSL/Instance.cpp +++ b/cpp/src/IceSSL/Instance.cpp @@ -9,14 +9,13 @@ #include <Instance.h> #include <EndpointI.h> +#include <Util.h> #include <Ice/Communicator.h> #include <Ice/LocalException.h> #include <Ice/Logger.h> #include <Ice/Properties.h> #include <Ice/ProtocolPluginFacade.h> -#include <openssl/err.h> - using namespace std; using namespace Ice; using namespace IceSSL; @@ -143,59 +142,7 @@ IceSSL::Instance::passwordPrompt() const string IceSSL::Instance::sslErrors() const { - ostringstream ostr; - - const unsigned long threadId = CRYPTO_thread_id(); - - const char* file; - const char* data; - int line; - int flags; - unsigned long err; - int count = 0; - while((err = ERR_get_error_line_data(&file, &line, &data, &flags)) != 0) - { - if(count > 0) - { - ostr << endl; - } - - if(_securityTraceLevel >= 1) - { - if(count > 0) - { - ostr << endl; - } - - char buf[200]; - ERR_error_string_n(err, buf, sizeof(buf)); - - ostr << "thread id = " << threadId << endl; - ostr << "error # = " << err << endl; - ostr << "message = " << buf << endl; - ostr << "location = " << file << ", " << line; - if(flags & ERR_TXT_STRING) - { - ostr << endl; - ostr << "data = " << data; - } - } - else - { - const char* reason = ERR_reason_error_string(err); - ostr << (reason == NULL ? "unknown reason" : reason); - if(flags & ERR_TXT_STRING) - { - ostr << ": " << data; - } - } - - ++count; - } - - ERR_clear_error(); - - return ostr.str(); + return getSslErrors(_securityTraceLevel >= 1); } void |