summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/PluginI.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2014-03-19 12:45:55 -0700
committerMark Spruiell <mes@zeroc.com>2014-03-19 12:45:55 -0700
commitcdcffbcc3c3c052afdeb772ff0167e7a90b525bb (patch)
tree4f16ee41ef7d33394c44e9db81e4d6cd89908250 /cpp/src/IceSSL/PluginI.cpp
parentfixing testicedist.py for 5487 (diff)
downloadice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.tar.bz2
ice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.tar.xz
ice-cdcffbcc3c3c052afdeb772ff0167e7a90b525bb.zip
merging javascript branch
Diffstat (limited to 'cpp/src/IceSSL/PluginI.cpp')
-rw-r--r--cpp/src/IceSSL/PluginI.cpp30
1 files changed, 21 insertions, 9 deletions
diff --git a/cpp/src/IceSSL/PluginI.cpp b/cpp/src/IceSSL/PluginI.cpp
index 1024691b2c6..91e07455ff8 100644
--- a/cpp/src/IceSSL/PluginI.cpp
+++ b/cpp/src/IceSSL/PluginI.cpp
@@ -1,6 +1,6 @@
// **********************************************************************
//
-// Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
+// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
@@ -10,7 +10,10 @@
#include <IceSSL/PluginI.h>
#include <IceSSL/Instance.h>
#include <IceSSL/TransceiverI.h>
+#include <IceSSL/EndpointI.h>
+#include <IceSSL/EndpointInfo.h>
+#include <Ice/ProtocolPluginFacade.h>
#include <Ice/LocalException.h>
#include <Ice/Object.h>
@@ -38,42 +41,51 @@ createIceSSL(const CommunicatorPtr& communicator, const string& /*name*/, const
//
IceSSL::PluginI::PluginI(const Ice::CommunicatorPtr& communicator)
{
- _instance = new Instance(communicator);
+ _sharedInstance = new SharedInstance(communicator);
+
+ IceInternal::ProtocolPluginFacadePtr facade = IceInternal::getProtocolPluginFacade(communicator);
+
+ //
+ // Register the endpoint factory. We have to do this now, rather than
+ // in initialize, because the communicator may need to interpret
+ // proxies before the plug-in is fully initialized.
+ //
+ facade->addEndpointFactory(new EndpointFactoryI(new Instance(_sharedInstance, EndpointType, "ssl")));
}
void
IceSSL::PluginI::initialize()
{
- _instance->initialize();
+ _sharedInstance->initialize();
}
void
IceSSL::PluginI::destroy()
{
- _instance->destroy();
- _instance = 0;
+ _sharedInstance->destroy();
+ _sharedInstance = 0;
}
void
IceSSL::PluginI::setContext(SSL_CTX* context)
{
- _instance->context(context);
+ _sharedInstance->context(context);
}
SSL_CTX*
IceSSL::PluginI::getContext()
{
- return _instance->context();
+ return _sharedInstance->context();
}
void
IceSSL::PluginI::setCertificateVerifier(const CertificateVerifierPtr& verifier)
{
- _instance->setCertificateVerifier(verifier);
+ _sharedInstance->setCertificateVerifier(verifier);
}
void
IceSSL::PluginI::setPasswordPrompt(const PasswordPromptPtr& prompt)
{
- _instance->setPasswordPrompt(prompt);
+ _sharedInstance->setPasswordPrompt(prompt);
}