summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-01-15 11:42:09 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-01-15 11:42:09 +0000
commitc512c662937347b74f423ad22eebeab1c223396c (patch)
treeabcc8624e2803e7d5333d6f4de1c2c075e29c8c8 /cpp
parentbug 1667 (diff)
downloadice-c512c662937347b74f423ad22eebeab1c223396c.tar.bz2
ice-c512c662937347b74f423ad22eebeab1c223396c.tar.xz
ice-c512c662937347b74f423ad22eebeab1c223396c.zip
Fixed bug 1361
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/IceSSL/TransceiverI.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpp/src/IceSSL/TransceiverI.cpp b/cpp/src/IceSSL/TransceiverI.cpp
index c0c2595bf83..157a65614e6 100644
--- a/cpp/src/IceSSL/TransceiverI.cpp
+++ b/cpp/src/IceSSL/TransceiverI.cpp
@@ -332,8 +332,17 @@ IceSSL::TransceiverI::read(IceInternal::Buffer& buf, int timeout)
// "decryption failed or bad record mac". We trap that error and
// treat it as the loss of a connection.
//
+ // NOTE: We have to compare the reason string instead
+ // of the error codes because the error code values
+ // changed between OpenSSL 0.9.7i and 0.9.7j and
+ // between OpenSSL 0.9.8a and 0.9.8b...
+ //
+ //unsigned long e = ERR_peek_error();
+ //if(ERR_GET_LIB(e) == ERR_LIB_SSL && ERR_GET_REASON(e) == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC)
+ //
unsigned long e = ERR_peek_error();
- if(ERR_GET_LIB(e) == ERR_LIB_SSL && ERR_GET_REASON(e) == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC)
+ if(ERR_GET_LIB(e) == ERR_LIB_SSL &&
+ strcmp(ERR_reason_error_string(e), "decryption failed or bad record mac") == 0)
{
ConnectionLostException ex(__FILE__, __LINE__);
ex.error = 0;