diff options
author | Anthony Neal <aneal@zeroc.com> | 2002-03-05 14:26:38 +0000 |
---|---|---|
committer | Anthony Neal <aneal@zeroc.com> | 2002-03-05 14:26:38 +0000 |
commit | 088253dd72c4e65cf8230719def050d0d043aa92 (patch) | |
tree | b54fc12cc78cef3eca7c57de368c116dfa4307bb /cpp/src/Ice/SslFactory.cpp | |
parent | bug fix for dispatching new operations (diff) | |
download | ice-088253dd72c4e65cf8230719def050d0d043aa92.tar.bz2 ice-088253dd72c4e65cf8230719def050d0d043aa92.tar.xz ice-088253dd72c4e65cf8230719def050d0d043aa92.zip |
Big check in. Glacier client authentication (certificate verification) has
been added, SSL logging has been removed, a few clean-ups have taken
place. Getting ready for SSL Extension refactoring.
Diffstat (limited to 'cpp/src/Ice/SslFactory.cpp')
-rw-r--r-- | cpp/src/Ice/SslFactory.cpp | 45 |
1 files changed, 41 insertions, 4 deletions
diff --git a/cpp/src/Ice/SslFactory.cpp b/cpp/src/Ice/SslFactory.cpp index 7ff34d6ff89..0503e256919 100644 --- a/cpp/src/Ice/SslFactory.cpp +++ b/cpp/src/Ice/SslFactory.cpp @@ -19,7 +19,7 @@ #include <Ice/SslFactory.h> #include <Ice/SslSystemOpenSSL.h> -#include <Ice/OpenSSL.h>
+#include <Ice/OpenSSL.h> #define OPENSSL_THREAD_DEFINES #include <openssl/opensslconf.h> @@ -193,19 +193,56 @@ IceSecurity::Ssl::Factory::reapSystems() void IceSecurity::Ssl::setSystemCertificateVerifier(const string& systemIdentifier, - CertificateVerifierType verifierType, + SslContextType contextType, const CertificateVerifierPtr& certificateVerifier) { SystemPtr sslSystem = Factory::getSystem(systemIdentifier); - if ((verifierType == Client) || (verifierType == ClientServer)) + if ((contextType == Client) || (contextType == ClientServer)) { sslSystem->setClientCertificateVerifier(certificateVerifier); } - if ((verifierType == Server) || (verifierType == ClientServer)) + if ((contextType == Server) || (contextType == ClientServer)) { sslSystem->setServerCertificateVerifier(certificateVerifier); } } +void +IceSecurity::Ssl::setSystemCertAuthCertificate(const string& systemIdentifier, + SslContextType contextType, + const string& caCertString) +{ + SystemPtr sslSystem = Factory::getSystem(systemIdentifier); + + if ((contextType == Client) || (contextType == ClientServer)) + { + sslSystem->setClientCertAuthorityCertificate(caCertString); + } + + if ((contextType == Server) || (contextType == ClientServer)) + { + sslSystem->setServerCertAuthorityCertificate(caCertString); + } +} + +void +IceSecurity::Ssl::setSystemRSAKeysBase64(const string& systemIdentifier, + SslContextType contextType, + const string& privateKey, + const string& publicKey) +{ + SystemPtr sslSystem = Factory::getSystem(systemIdentifier); + + if ((contextType == Client) || (contextType == ClientServer)) + { + sslSystem->setClientRSAKeysBase64(privateKey, publicKey); + } + + if ((contextType == Server) || (contextType == ClientServer)) + { + sslSystem->setServerRSAKeysBase64(privateKey, publicKey); + } +} + |