diff options
author | Mark Spruiell <mes@zeroc.com> | 2006-04-19 13:57:26 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2006-04-19 13:57:26 +0000 |
commit | 9e516d6a3051e2b164042cbfe650f42ee184d1f5 (patch) | |
tree | 65d6508d7112625ee7d95af48007f2f73d49f3fd /cpp/src/IceSSL/Context.cpp | |
parent | separating client/server configuration; removing client/server properties (diff) | |
download | ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.tar.bz2 ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.tar.xz ice-9e516d6a3051e2b164042cbfe650f42ee184d1f5.zip |
removing client/server properties for IceSSL
Diffstat (limited to 'cpp/src/IceSSL/Context.cpp')
-rw-r--r-- | cpp/src/IceSSL/Context.cpp | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/cpp/src/IceSSL/Context.cpp b/cpp/src/IceSSL/Context.cpp index 2635a51a9ec..1988f526116 100644 --- a/cpp/src/IceSSL/Context.cpp +++ b/cpp/src/IceSSL/Context.cpp @@ -80,7 +80,7 @@ passwordError() // // Context. // -IceSSL::Context::Context(const InstancePtr& instance, const string& propPrefix, SSL_CTX* ctx) : +IceSSL::Context::Context(const InstancePtr& instance, SSL_CTX* ctx) : _instance(instance), _logger(instance->communicator()->getLogger()), _ctx(ctx) @@ -114,6 +114,7 @@ IceSSL::Context::Context(const InstancePtr& instance, const string& propPrefix, SSL_CTX_set_session_cache_mode(_ctx, SSL_SESS_CACHE_OFF); PropertiesPtr properties = _instance->communicator()->getProperties(); + const string propPrefix = "IceSSL."; // // Check for a default directory. We look in this directory for @@ -135,6 +136,14 @@ IceSSL::Context::Context(const InstancePtr& instance, const string& propPrefix, } // + // CheckCertName determines whether we compare the name in a peer's + // certificate against its hostname. + // + { + _checkCertName = properties->getPropertyAsIntWithDefault(propPrefix + "CheckCertName", 0) > 0; + } + + // // Determine whether a certificate is required from the peer. // { @@ -551,6 +560,7 @@ IceSSL::Context::verifyPeer(SSL* ssl, const string& address, bool incoming) // // Compare the peer's address against the dnsName and ipAddress values. + // This is only relevant for an outgoing connection. // if(!address.empty()) { @@ -838,29 +848,3 @@ IceSSL::Context::parseProtocols(const string& val) } SSL_CTX_set_options(_ctx, opts); } - -// -// ClientContext. -// -IceSSL::ClientContext::ClientContext(const InstancePtr& instance, SSL_CTX* ctx) : - Context(instance, "IceSSL.Client.", ctx) -{ - PropertiesPtr properties = _instance->communicator()->getProperties(); - - // - // CheckCertName determines whether we compare the name in a peer's - // certificate against its hostname. - // - { - _checkCertName = properties->getPropertyAsIntWithDefault("IceSSL.Client.CheckCertName", 0) > 0; - } -} - -// -// ServerContext. -// -IceSSL::ServerContext::ServerContext(const InstancePtr& instance, SSL_CTX* ctx) : - Context(instance, "IceSSL.Server.", ctx) -{ - _checkCertName = false; -} |