diff options
Diffstat (limited to 'cpp/src/Ice/SslConnectionOpenSSL.cpp')
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSL.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/cpp/src/Ice/SslConnectionOpenSSL.cpp b/cpp/src/Ice/SslConnectionOpenSSL.cpp index 7a13f3a18de..3b3fba3554f 100644 --- a/cpp/src/Ice/SslConnectionOpenSSL.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSL.cpp @@ -17,7 +17,7 @@ #include <Ice/Network.h>
#include <JTC/JTC.h>
#include <Ice/Security.h>
-#include <Ice/SslException.h>
+#include <Ice/SecurityException.h>
#include <Ice/SslConnection.h>
#include <Ice/SslSystemOpenSSL.h>
@@ -513,24 +513,28 @@ IceSecurity::Ssl::OpenSSL::Connection::readSSL(Buffer& buf, int timeout) }
else // (bytesRead == 0)
{
+ ProtocolException protocolEx(__FILE__, __LINE__);
+
// Protocol Error: Unexpected EOF
- string errorString = "Encountered an EOF that violates the SSL Protocol.\n";
+ protocolEx._message = "Encountered an EOF that violates the SSL Protocol.";
- ICE_SSLERRORS(errorString);
- ICE_EXCEPTION(errorString);
+ ICE_SSLERRORS(protocolEx._message);
+ ICE_EXCEPTION(protocolEx._message);
- throw ProtocolException(errorString.c_str(), __FILE__, __LINE__);
+ throw protocolEx;
}
}
case SSL_ERROR_SSL:
{
- string errorString = "Encountered a violation of the SSL Protocol.\n";
+ ProtocolException protocolEx(__FILE__, __LINE__);
+
+ protocolEx._message = "Encountered a violation of the SSL Protocol.";
- ICE_SSLERRORS(errorString);
- ICE_EXCEPTION(errorString);
+ ICE_SSLERRORS(protocolEx._message);
+ ICE_EXCEPTION(protocolEx._message);
- throw ProtocolException(errorString.c_str(), __FILE__, __LINE__);
+ throw protocolEx;
}
case SSL_ERROR_ZERO_RETURN:
|