diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-05-01 20:45:50 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-05-01 20:45:50 +0000 |
commit | 3f1d399d186ea2c00e446de589c2c74aa08f5969 (patch) | |
tree | 40560525601e33410a21fd93f6fc615bb821fafb /cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp | |
parent | fix (diff) | |
download | ice-3f1d399d186ea2c00e446de589c2c74aa08f5969.tar.bz2 ice-3f1d399d186ea2c00e446de589c2c74aa08f5969.tar.xz ice-3f1d399d186ea2c00e446de589c2c74aa08f5969.zip |
Fixes to the handling of SSL_ERROR_ZERO_RETURN in the init(), as well as
the proper clearing of the error queue before SSL_* calls.
Diffstat (limited to 'cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp')
-rw-r--r-- | cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp b/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp index ee311d28838..e810873818f 100644 --- a/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp +++ b/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp @@ -158,6 +158,7 @@ IceSSL::OpenSSL::ClientConnection::init(int timeout) // errno isn't set in this situation, so we always use // ECONNREFUSED. // +// std::cout << std::dec << clock() << " init(): SSL_ERROR_SYSCALL: (result == 0)" << std::endl;
ConnectFailedException ex(__FILE__, __LINE__); #ifdef _WIN32 ex.error = WSAECONNREFUSED; @@ -198,6 +199,17 @@ IceSSL::OpenSSL::ClientConnection::init(int timeout) throw protocolEx; } } +
+ case SSL_ERROR_ZERO_RETURN:
+ {
+ // Indicates that that the SSL Connection has been closed.
+ // But does not necessarily indicate that the underlying transport
+ // has been closed (in the case of Ice, it definitely hasn't yet).
+
+ ConnectionLostException ex(__FILE__, __LINE__);
+ ex.error = getSocketErrno();
+ throw ex;
+ }
} retCode = SSL_is_init_finished(_sslConnection); |