summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/ContextOpenSSLClient.cpp
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2002-09-11 12:33:02 +0000
committerAnthony Neal <aneal@zeroc.com>2002-09-11 12:33:02 +0000
commit22056550f5f34cc2ee1cd28a23fd40545c566c4b (patch)
treedcd27d328d2e11f09924a407cc5fb08dfac32d8d /cpp/src/IceSSL/ContextOpenSSLClient.cpp
parentfixed retry bug (diff)
downloadice-22056550f5f34cc2ee1cd28a23fd40545c566c4b.tar.bz2
ice-22056550f5f34cc2ee1cd28a23fd40545c566c4b.tar.xz
ice-22056550f5f34cc2ee1cd28a23fd40545c566c4b.zip
Removed the Connection classes, added the new SslTransceiver hierarchy,
cleaned up a lot of code.
Diffstat (limited to 'cpp/src/IceSSL/ContextOpenSSLClient.cpp')
-rw-r--r--cpp/src/IceSSL/ContextOpenSSLClient.cpp30
1 files changed, 14 insertions, 16 deletions
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 <Ice/Logger.h>
#include <IceSSL/Exception.h>
-#include <IceSSL/SslConnectionOpenSSL.h>
#include <IceSSL/ContextOpenSSLClient.h>
-#include <IceSSL/SslConnectionOpenSSLClient.h>
+#include <IceSSL/SslClientTransceiver.h>
#include <IceSSL/TraceLevels.h>
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";