diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-03-04 07:03:11 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-03-04 07:03:11 +0000 |
commit | 2a7dbca481c8482e5962cfa57b5b71d060711fc1 (patch) | |
tree | 37c2b502c9d1096ba06781630d52950b2d5d4ee2 /cpp/src/IceSSL/OpenSSLPluginI.cpp | |
parent | some .Net changes, manual -> reference, removing some unnecessary files (diff) | |
download | ice-2a7dbca481c8482e5962cfa57b5b71d060711fc1.tar.bz2 ice-2a7dbca481c8482e5962cfa57b5b71d060711fc1.tar.xz ice-2a7dbca481c8482e5962cfa57b5b71d060711fc1.zip |
The SSL plug-in no longer caches the logger.
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.cpp')
-rw-r--r-- | cpp/src/IceSSL/OpenSSLPluginI.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.cpp b/cpp/src/IceSSL/OpenSSLPluginI.cpp index dab74335b72..bc44862e5b8 100644 --- a/cpp/src/IceSSL/OpenSSLPluginI.cpp +++ b/cpp/src/IceSSL/OpenSSLPluginI.cpp @@ -182,7 +182,6 @@ IceSSL::SslLockKeeper::~SslLockKeeper() IceSSL::OpenSSLPluginI::OpenSSLPluginI(const IceInternal::ProtocolPluginFacadePtr& protocolPluginFacade) : _protocolPluginFacade(protocolPluginFacade), _traceLevels(new TraceLevels(_protocolPluginFacade)), - _logger(_protocolPluginFacade->getCommunicator()->getLogger()), _properties(_protocolPluginFacade->getCommunicator()->getProperties()), _memDebug(_properties->getPropertyAsIntWithDefault("IceSSL.MemoryDebug", 0)), _serverContext(new TraceLevels(protocolPluginFacade), protocolPluginFacade->getCommunicator()), @@ -418,7 +417,7 @@ IceSSL::OpenSSLPluginI::loadConfig(ContextType contextType, throw configEx; } - ConfigParser sslConfig(configFile, certPath, _traceLevels, _logger); + ConfigParser sslConfig(configFile, certPath, _traceLevels, getLogger()); // Actually parse the file now. sslConfig.process(); @@ -456,7 +455,7 @@ IceSSL::OpenSSLPluginI::loadConfig(ContextType contextType, if(_traceLevels->security >= SECURITY_PROTOCOL) { - Trace out(_logger, _traceLevels->securityCat); + Trace out(getLogger(), _traceLevels->securityCat); out << "temporary certificates (server)\n"; out << "-------------------------------\n"; @@ -547,7 +546,7 @@ IceSSL::OpenSSLPluginI::getRSAKey(int isExport, int keyLength) } else if(_traceLevels->security >= SECURITY_WARNINGS) { - Trace out(_logger, _traceLevels->securityCat); + Trace out(getLogger(), _traceLevels->securityCat); out << "WRN Unable to obtain a " << dec << keyLength << "-bit RSA key.\n"; } } @@ -623,7 +622,7 @@ IceSSL::OpenSSLPluginI::getDHParams(int isExport, int keyLength) } else if(_traceLevels->security >= SECURITY_WARNINGS) { - Trace out(_logger, _traceLevels->securityCat); + Trace out(getLogger(), _traceLevels->securityCat); out << "WRN Unable to obtain a " << dec << keyLength << "-bit Diffie-Hellman parameter group.\n"; } } @@ -751,7 +750,11 @@ IceSSL::OpenSSLPluginI::getTraceLevels() const LoggerPtr IceSSL::OpenSSLPluginI::getLogger() const { - return _logger; + // + // Don't cache the logger object. It might not be set on the + // communicator when the plug-in is initialized. + // + return _protocolPluginFacade->getCommunicator()->getLogger(); } StatsPtr @@ -876,7 +879,7 @@ IceSSL::OpenSSLPluginI::initRandSystem(const string& randBytesFiles) // In this case, there are two options open to us - specify a random data file using the // RANDFILE environment variable, or specify additional random data files in the // SSL configuration file. - Trace out(_logger, _traceLevels->securityCat); + Trace out(getLogger(), _traceLevels->securityCat); out << "WRN there is a lack of random data, consider specifying additional random data files"; } |