summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/ConnectorI.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2006-04-26 03:22:10 +0000
committerMark Spruiell <mes@zeroc.com>2006-04-26 03:22:10 +0000
commit5debd95d8042c28b61707fae94b34d5011cde479 (patch)
treebdf64200af1e1724e6949fbf03f08bfe0cc2ec2b /cpp/src/IceSSL/ConnectorI.cpp
parentminor fix (diff)
downloadice-5debd95d8042c28b61707fae94b34d5011cde479.tar.bz2
ice-5debd95d8042c28b61707fae94b34d5011cde479.tar.xz
ice-5debd95d8042c28b61707fae94b34d5011cde479.zip
use two stages for plugin initialization; refactoring to remove Context
Diffstat (limited to 'cpp/src/IceSSL/ConnectorI.cpp')
-rw-r--r--cpp/src/IceSSL/ConnectorI.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/cpp/src/IceSSL/ConnectorI.cpp b/cpp/src/IceSSL/ConnectorI.cpp
index cdec88b1ae8..dd233b9f9da 100644
--- a/cpp/src/IceSSL/ConnectorI.cpp
+++ b/cpp/src/IceSSL/ConnectorI.cpp
@@ -16,7 +16,7 @@
#include <Ice/LoggerUtil.h>
#include <Ice/Network.h>
-#include <openssl/err.h>
+//#include <openssl/err.h>
using namespace std;
using namespace Ice;
@@ -26,9 +26,14 @@ IceInternal::TransceiverPtr
IceSSL::ConnectorI::connect(int timeout)
{
//
- // The plugin may not be fully initialized.
+ // The plugin may not be initialized.
//
- ContextPtr ctx = _instance->context();
+ if(!_instance->context())
+ {
+ PluginInitializationException ex(__FILE__, __LINE__);
+ ex.reason = "IceSSL: plugin is not initialized";
+ throw ex;
+ }
if(_instance->networkTraceLevel() >= 2)
{
@@ -49,7 +54,7 @@ IceSSL::ConnectorI::connect(int timeout)
throw ex;
}
- SSL* ssl = SSL_new(ctx->ctx());
+ SSL* ssl = SSL_new(_instance->context());
if(!ssl)
{
BIO_free(bio); // Also closes the socket.
@@ -145,7 +150,7 @@ IceSSL::ConnectorI::connect(int timeout)
}
while(!SSL_is_init_finished(ssl));
- _instance->context()->verifyPeer(ssl, fd, _host, false);
+ _instance->verifyPeer(ssl, fd, _host, false);
}
catch(...)
{
@@ -161,7 +166,7 @@ IceSSL::ConnectorI::connect(int timeout)
if(_instance->securityTraceLevel() >= 1)
{
- _instance->context()->traceConnection(ssl, false);
+ _instance->traceConnection(ssl, false);
}
return new TransceiverI(_instance, ssl, fd);