summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/Context.cpp
diff options
context:
space:
mode:
authorAnthony Neal <aneal@zeroc.com>2003-12-12 16:48:27 +0000
committerAnthony Neal <aneal@zeroc.com>2003-12-12 16:48:27 +0000
commit08c9a04f60fc6dd34c8c1508b0afb603e47d1f36 (patch)
tree17a638307333c15224e59db1446e339d852b5927 /cpp/src/IceSSL/Context.cpp
parentfixes (diff)
downloadice-08c9a04f60fc6dd34c8c1508b0afb603e47d1f36.tar.bz2
ice-08c9a04f60fc6dd34c8c1508b0afb603e47d1f36.tar.xz
ice-08c9a04f60fc6dd34c8c1508b0afb603e47d1f36.zip
Modifications made to:
Add additional cleanup processing on Plugin destruction. Add IceSSL.MemoryDebug messages.
Diffstat (limited to 'cpp/src/IceSSL/Context.cpp')
-rw-r--r--cpp/src/IceSSL/Context.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/cpp/src/IceSSL/Context.cpp b/cpp/src/IceSSL/Context.cpp
index 71dd0d8af97..6edb2294fc1 100644
--- a/cpp/src/IceSSL/Context.cpp
+++ b/cpp/src/IceSSL/Context.cpp
@@ -37,12 +37,7 @@ void IceInternal::decRef(::IceSSL::Context* p) { p->__decRef(); }
IceSSL::Context::~Context()
{
- if(_sslContext != 0)
- {
- SSL_CTX_free(_sslContext);
-
- _sslContext = 0;
- }
+ cleanUp();
}
bool
@@ -52,6 +47,17 @@ IceSSL::Context::isConfigured()
}
void
+IceSSL::Context::cleanUp()
+{
+ if(_sslContext != 0)
+ {
+ SSL_CTX_free(_sslContext);
+
+ _sslContext = 0;
+ }
+}
+
+void
IceSSL::Context::setCertificateVerifier(const CertificateVerifierPtr& verifier)
{
_certificateVerifier = verifier;
@@ -74,8 +80,7 @@ IceSSL::Context::addTrustedCertificate(const Ice::ByteSeq& trustedCert)
}
void
-IceSSL::Context::setRSAKeysBase64(const string& privateKey,
- const string& publicKey)
+IceSSL::Context::setRSAKeysBase64(const string& privateKey, const string& publicKey)
{
if(privateKey.empty())
{
@@ -264,7 +269,6 @@ IceSSL::Context::loadCertificateAuthority(const CertificateAuthority& certAuth)
{
int setDefaultVerifyPathsRet = SSL_CTX_set_default_verify_paths(_sslContext);
-
if(!setDefaultVerifyPathsRet && (_traceLevels->security >= IceSSL::SECURITY_WARNINGS))
{
Trace out(_communicator->getLogger(), _traceLevels->securityCat);
@@ -282,8 +286,8 @@ IceSSL::Context::loadCertificateAuthority(const CertificateAuthority& certAuth)
void
IceSSL::Context::setKeyCert(const CertificateDesc& certDesc,
- const string& privateProperty,
- const string& publicProperty)
+ const string& privateProperty,
+ const string& publicProperty)
{
string privateKey;
string publicKey;