diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceSSL/RSAPrivateKey.cpp | 5 | ||||
-rw-r--r-- | cpp/src/IceSSL/SslConnectionOpenSSL.cpp | 10 | ||||
-rw-r--r-- | cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp | 1 |
3 files changed, 3 insertions, 13 deletions
diff --git a/cpp/src/IceSSL/RSAPrivateKey.cpp b/cpp/src/IceSSL/RSAPrivateKey.cpp index 9c6bdf4e29c..7499c69ecdc 100644 --- a/cpp/src/IceSSL/RSAPrivateKey.cpp +++ b/cpp/src/IceSSL/RSAPrivateKey.cpp @@ -106,6 +106,8 @@ IceSSL::OpenSSL::RSAPrivateKey::byteSeqToKey(const ByteSeq& keySeq) _privateKey = d2i_RSAPrivateKey(rsapp, privKeyBuffpp, (long)keySeq.size()); + delete [] privateKeyBuffer;
+
if (_privateKey == 0) { IceSSL::PrivateKeyParseException pkParseException(__FILE__, __LINE__); @@ -114,8 +116,5 @@ IceSSL::OpenSSL::RSAPrivateKey::byteSeqToKey(const ByteSeq& keySeq) throw pkParseException; } - - // ML: Not deleted if an exception is raised! - delete [] privateKeyBuffer; } diff --git a/cpp/src/IceSSL/SslConnectionOpenSSL.cpp b/cpp/src/IceSSL/SslConnectionOpenSSL.cpp index 67d213b742a..f4b56da7cf9 100644 --- a/cpp/src/IceSSL/SslConnectionOpenSSL.cpp +++ b/cpp/src/IceSSL/SslConnectionOpenSSL.cpp @@ -307,9 +307,7 @@ int IceSSL::OpenSSL::Connection::getLastError() const { assert(_sslConnection != 0);
- int retCode = SSL_get_error(_sslConnection, _lastError);
-// std::cout << "SSL_get_error(): " << std::dec << retCode << std::endl;
- return retCode; + return SSL_get_error(_sslConnection, _lastError); } int @@ -487,7 +485,6 @@ IceSSL::OpenSSL::Connection::read(Buffer& buf, int timeout) { if (!readSelect(timeout)) {
-// std::cout << "SSL_ERROR_WANT_READ" << std::endl; // Timeout and wait for them to arrive. throw TimeoutException(__FILE__, __LINE__); } @@ -521,12 +518,10 @@ IceSSL::OpenSSL::Connection::read(Buffer& buf, int timeout) { ConnectionLostException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); -// std::cout << std::dec << clock() << " SSL_ERROR_SYSCALL: connectionLost() = " << std::dec << ex.error << std::endl;
throw ex; } else { -// std::cout << std::dec << clock() << " SSL_ERROR_SYSCALL" << std::endl;
SocketException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; @@ -534,7 +529,6 @@ IceSSL::OpenSSL::Connection::read(Buffer& buf, int timeout) } else // (bytesRead == 0) { -// std::cout << std::dec << clock() << " SSL_ERROR_SYSCALL: (bytesRead == 0)" << std::endl;
ConnectionLostException ex(__FILE__, __LINE__); ex.error = 0; throw ex; @@ -557,8 +551,6 @@ IceSSL::OpenSSL::Connection::read(Buffer& buf, int timeout) // But does not necessarily indicate that the underlying transport // has been closed (in the case of Ice, it definitely hasn't yet). -// std::cout << std::dec << clock() << " SSL_ERROR_ZERO_RETURN" << std::endl;
-// std::cout << "SslErrors:" << std::endl << sslGetErrors() << std::endl;
ConnectionLostException ex(__FILE__, __LINE__); ex.error = getSocketErrno(); throw ex; diff --git a/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp b/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp index e810873818f..5d2e247632b 100644 --- a/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp +++ b/cpp/src/IceSSL/SslConnectionOpenSSLClient.cpp @@ -158,7 +158,6 @@ 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; |