From 22056550f5f34cc2ee1cd28a23fd40545c566c4b Mon Sep 17 00:00:00 2001 From: Anthony Neal Date: Wed, 11 Sep 2002 12:33:02 +0000 Subject: Removed the Connection classes, added the new SslTransceiver hierarchy, cleaned up a lot of code. --- cpp/src/IceSSL/ContextOpenSSLClient.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'cpp/src/IceSSL/ContextOpenSSLClient.cpp') diff --git a/cpp/src/IceSSL/ContextOpenSSLClient.cpp b/cpp/src/IceSSL/ContextOpenSSLClient.cpp index 6f735e98c43..da127d331c3 100644 --- a/cpp/src/IceSSL/ContextOpenSSLClient.cpp +++ b/cpp/src/IceSSL/ContextOpenSSLClient.cpp @@ -11,26 +11,23 @@ #include #include -#include #include -#include +#include #include using namespace std; using namespace Ice; -using IceSSL::ConnectionPtr; - void -IceSSL::OpenSSL::ClientContext::configure(const GeneralConfig& generalConfig, - const CertificateAuthority& certificateAuthority, - const BaseCertificates& baseCertificates) +IceSSL::ClientContext::configure(const GeneralConfig& generalConfig, + const CertificateAuthority& certificateAuthority, + const BaseCertificates& baseCertificates) { Context::configure(generalConfig, certificateAuthority, baseCertificates); loadCertificateAuthority(certificateAuthority); - if(_traceLevels->security >= IceSSL::SECURITY_PROTOCOL) + if(_traceLevels->security >= SECURITY_PROTOCOL) { ostringstream s; @@ -52,25 +49,26 @@ IceSSL::OpenSSL::ClientContext::configure(const GeneralConfig& generalConfig, } } -IceSSL::ConnectionPtr -IceSSL::OpenSSL::ClientContext::createConnection(int socket, const PluginBaseIPtr& plugin) +IceSSL::SslTransceiverPtr +IceSSL::ClientContext::createTransceiver(int socket, const PluginBaseIPtr& plugin) { if(_sslContext == 0) { - IceSSL::OpenSSL::ContextNotConfiguredException contextEx(__FILE__, __LINE__); + OpenSSL::ContextNotConfiguredException contextEx(__FILE__, __LINE__); throw contextEx; } - ConnectionPtr connection = new ClientConnection(_certificateVerifier, createSSLConnection(socket), plugin); + SSL* ssl = createSSLConnection(socket); + SslTransceiverPtr transceiver = new SslClientTransceiver(plugin, socket, _certificateVerifier, ssl); - connectionSetup(connection); + transceiverSetup(transceiver); - return connection; + return transceiver; } -IceSSL::OpenSSL::ClientContext::ClientContext(const IceSSL::TraceLevelsPtr& traceLevels, const LoggerPtr& logger, - const PropertiesPtr& properties) : +IceSSL::ClientContext::ClientContext(const TraceLevelsPtr& traceLevels, const LoggerPtr& logger, + const PropertiesPtr& properties) : Context(traceLevels, logger, properties) { _rsaPrivateKeyProperty = "IceSSL.Client.Overrides.RSA.PrivateKey"; -- cgit v1.2.3