summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/SslConnectionOpenSSL.cpp
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2001-11-19 16:57:26 +0000
committerAnthony Neal <aneal@zeroc.com>2001-11-19 16:57:26 +0000
commit49f62a02524a98b8bd1c40cfd2c3f96d8070aeb5 (patch)
tree57959cf59c2e4c7e45449a63a5a8362cd3bbb05c /cpp/src/Ice/SslConnectionOpenSSL.cpp
parentFixed some bugs regarding exception message reporting. (diff)
downloadice-49f62a02524a98b8bd1c40cfd2c3f96d8070aeb5.tar.bz2
ice-49f62a02524a98b8bd1c40cfd2c3f96d8070aeb5.tar.xz
ice-49f62a02524a98b8bd1c40cfd2c3f96d8070aeb5.zip
Now Ssl (Security) exceptions are genereated from slice.
Diffstat (limited to 'cpp/src/Ice/SslConnectionOpenSSL.cpp')
-rw-r--r--cpp/src/Ice/SslConnectionOpenSSL.cpp22
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: