diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-03-18 17:51:29 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-03-18 17:51:29 +0000 |
commit | 0e943ab6c7159ac053a9d4da4ff6ac37c801ff38 (patch) | |
tree | 07b6189539cfd40c9c6bbf579d0e4b0bb205dbe3 /cpp/src/Ice/SslConnectionOpenSSLServer.cpp | |
parent | bug fix: create copy of Identity (diff) | |
download | ice-0e943ab6c7159ac053a9d4da4ff6ac37c801ff38.tar.bz2 ice-0e943ab6c7159ac053a9d4da4ff6ac37c801ff38.tar.xz ice-0e943ab6c7159ac053a9d4da4ff6ac37c801ff38.zip |
Renamed all the Ssl* files. Modified the config/TestUtil.py file to include
a clientServerHybridTest - handles the test case that client and server
are BOTH client and server roles.
Diffstat (limited to 'cpp/src/Ice/SslConnectionOpenSSLServer.cpp')
-rw-r--r-- | cpp/src/Ice/SslConnectionOpenSSLServer.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp index 7df78b3d32d..40e0758165e 100644 --- a/cpp/src/Ice/SslConnectionOpenSSLServer.cpp +++ b/cpp/src/Ice/SslConnectionOpenSSLServer.cpp @@ -9,11 +9,11 @@ // ********************************************************************** #include <string> -#include <sstream>
-#include <Ice/SslOpenSSLUtils.h> +#include <sstream> +#include <Ice/OpenSSLUtils.h> #include <Ice/Network.h> #include <Ice/OpenSSL.h> -#include <Ice/SecurityException.h> +#include <Ice/SslException.h> #include <Ice/SslConnectionOpenSSLServer.h> #include <Ice/TraceLevels.h> @@ -48,17 +48,17 @@ using std::dec; // IceSSL::OpenSSL::ServerConnection::ServerConnection( - const IceInternal::TraceLevelsPtr& traceLevels,
- const Ice::LoggerPtr& logger,
+ const IceInternal::TraceLevelsPtr& traceLevels, + const Ice::LoggerPtr& logger, const IceSSL::CertificateVerifierPtr& certificateVerifier, - SSL* connection,
+ SSL* connection, const IceSSL::SystemInternalPtr& system) : Connection(traceLevels, logger, certificateVerifier, connection, system) -{
+{ assert(_sslConnection != 0); -
- // Set the Accept Connection state for this connection.
- SSL_set_accept_state(_sslConnection);
+ + // Set the Accept Connection state for this connection. + SSL_set_accept_state(_sslConnection); } IceSSL::OpenSSL::ServerConnection::~ServerConnection() @@ -73,9 +73,9 @@ IceSSL::OpenSSL::ServerConnection::shutdown() int IceSSL::OpenSSL::ServerConnection::init(int timeout) -{
- assert(_sslConnection != 0);
-
+{ + assert(_sslConnection != 0); + int retCode = SSL_is_init_finished(_sslConnection); while (!retCode) @@ -121,14 +121,14 @@ IceSSL::OpenSSL::ServerConnection::init(int timeout) { CertificateVerificationException certVerEx(__FILE__, __LINE__); - certVerEx._message = "SSL certificate verification error.";
-
- string errors = sslGetErrors();
-
- if (!errors.empty())
- {
- certVerEx._message += "\n";
- certVerEx._message += errors;
+ certVerEx._message = "SSL certificate verification error."; + + string errors = sslGetErrors(); + + if (!errors.empty()) + { + certVerEx._message += "\n"; + certVerEx._message += errors; } throw certVerEx; @@ -167,7 +167,7 @@ IceSSL::OpenSSL::ServerConnection::init(int timeout) } case SSL_ERROR_SYSCALL: - {
+ { // This is a SOCKET_ERROR, but we don't use // this define here as OpenSSL doesn't refer // to it as a SOCKET_ERROR (but that's what it is @@ -222,7 +222,7 @@ IceSSL::OpenSSL::ServerConnection::init(int timeout) } retCode = SSL_is_init_finished(_sslConnection); -
+ if (retCode > 0) { // Init finished, look at the connection information. @@ -401,7 +401,7 @@ IceSSL::OpenSSL::ServerConnection::write(Buffer& buf, int timeout) void IceSSL::OpenSSL::ServerConnection::showConnectionInfo() -{
+{ // Only in extreme cases do we enable this, partially because it doesn't use the Logger. if ((_traceLevels->security >= IceSSL::SECURITY_PROTOCOL_DEBUG) && 0) { |