summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/OpenSSLPluginI.h
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2002-06-24 18:49:27 +0000
committerMarc Laukien <marc@zeroc.com>2002-06-24 18:49:27 +0000
commit1cb9977463f5a832b3f6daea8a2322d38dbba423 (patch)
treed1ae4045c5fa9a7124201510df3ad5b7211788cb /cpp/src/IceSSL/OpenSSLPluginI.h
parentAdded checks to disallow definition of a name in a derived class/interface (diff)
downloadice-1cb9977463f5a832b3f6daea8a2322d38dbba423.tar.bz2
ice-1cb9977463f5a832b3f6daea8a2322d38dbba423.tar.xz
ice-1cb9977463f5a832b3f6daea8a2322d38dbba423.zip
unix format
Diffstat (limited to 'cpp/src/IceSSL/OpenSSLPluginI.h')
-rw-r--r--cpp/src/IceSSL/OpenSSLPluginI.h236
1 files changed, 118 insertions, 118 deletions
diff --git a/cpp/src/IceSSL/OpenSSLPluginI.h b/cpp/src/IceSSL/OpenSSLPluginI.h
index d18dfbe3e83..2aac3e8c179 100644
--- a/cpp/src/IceSSL/OpenSSLPluginI.h
+++ b/cpp/src/IceSSL/OpenSSLPluginI.h
@@ -1,118 +1,118 @@
-// **********************************************************************
-//
-// Copyright (c) 2002
-// MutableRealms, Inc.
-// Huntsville, AL, USA
-//
-// All Rights Reserved
-//
-// **********************************************************************
-
-#ifndef ICE_SSL_OPENSSL_PLUGIN_I_H
-#define ICE_SSL_OPENSSL_PLUGIN_I_H
-
-#include <IceUtil/RecMutex.h>
-#include <IceSSL/PluginBaseI.h>
-#include <IceSSL/CertificateDesc.h>
-#include <IceSSL/CertificateAuthority.h>
-#include <IceSSL/BaseCerts.h>
-#include <IceSSL/TempCerts.h>
-#include <IceSSL/ContextOpenSSLServer.h>
-#include <IceSSL/ContextOpenSSLClient.h>
-#include <IceSSL/RSAPrivateKeyF.h>
-#include <IceSSL/DHParamsF.h>
-#include <openssl/ssl.h>
-
-namespace IceSSL
-{
-
-namespace OpenSSL
-{
-
-typedef std::map<int,RSAPrivateKeyPtr> RSAMap;
-typedef std::map<int,DHParamsPtr> DHMap;
-
-typedef std::map<int,CertificateDesc> RSACertMap;
-typedef std::map<int,DiffieHellmanParamsFile> DHParamsMap;
-
-class PluginI : public PluginBaseI
-{
-public:
-
- PluginI(const IceInternal::ProtocolPluginFacadePtr&);
- ~PluginI();
-
- virtual IceSSL::ConnectionPtr createConnection(ContextType, int);
-
- virtual bool isConfigured(ContextType);
- virtual void configure();
- virtual void configure(ContextType);
- virtual void loadConfig(ContextType, const std::string&, const std::string&);
-
- // Returns the desired RSA Key, or creates it if not already created.
- // This is public because the tmpRSACallback must be able to access it.
- RSA* getRSAKey(int, int);
-
- // Returns the desired DH Params. If the Params do not already exist, and the key
- // requested is a 512bit or 1024bit key, we use the compiled-in temporary params.
- // If the key is some other length, we read the desired key, based on length,
- // from a DH Param file.
- // This is public because the tmpDHCallback must be able to access it.
- DH* getDHParams(int, int);
-
- virtual void setCertificateVerifier(ContextType, const IceSSL::CertificateVerifierPtr&);
-
- virtual void addTrustedCertificateBase64(ContextType, const std::string&);
-
- virtual void addTrustedCertificate(ContextType, const Ice::ByteSeq&);
-
- virtual void setRSAKeysBase64(ContextType, const std::string&, const std::string&);
-
- virtual void setRSAKeys(ContextType, const Ice::ByteSeq&, const Ice::ByteSeq&);
-
- virtual IceSSL::CertificateVerifierPtr getDefaultCertVerifier();
-
- virtual IceSSL::CertificateVerifierPtr getSingleCertVerifier(const Ice::ByteSeq&);
-
- virtual void destroy();
-
-private:
-
- ServerContext _serverContext;
- ClientContext _clientContext;
-
- // Mutex to ensure synchronization of calls to configure
- // the contexts and calls to create connections.
- IceUtil::RecMutex _configMutex;
-
- // Keep a cache of all temporary RSA keys.
- RSAMap _tempRSAKeys;
- IceUtil::Mutex _tempRSAKeysMutex;
-
- // Keep a cache of all temporary Diffie-Hellman keys.
- DHMap _tempDHKeys;
- IceUtil::Mutex _tempDHKeysMutex;
-
- // Maps of all temporary keying information.
- // The files themselves will not be loaded until
- // needed.
- RSACertMap _tempRSAFileMap;
- DHParamsMap _tempDHParamsFileMap;
-
- // Flag as to whether the Random Number system has been seeded.
- int _randSeeded;
-
- // Cryptographic Random Number System related routines.
- int seedRand();
- long loadRandFiles(const std::string&);
- void initRandSystem(const std::string&);
-
- // Load the temporary (ephemeral) certificates for Server operations.
- void loadTempCerts(TempCertificates&);
-};
-
-}
-
-}
-
-#endif
+// **********************************************************************
+//
+// Copyright (c) 2002
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef ICE_SSL_OPENSSL_PLUGIN_I_H
+#define ICE_SSL_OPENSSL_PLUGIN_I_H
+
+#include <IceUtil/RecMutex.h>
+#include <IceSSL/PluginBaseI.h>
+#include <IceSSL/CertificateDesc.h>
+#include <IceSSL/CertificateAuthority.h>
+#include <IceSSL/BaseCerts.h>
+#include <IceSSL/TempCerts.h>
+#include <IceSSL/ContextOpenSSLServer.h>
+#include <IceSSL/ContextOpenSSLClient.h>
+#include <IceSSL/RSAPrivateKeyF.h>
+#include <IceSSL/DHParamsF.h>
+#include <openssl/ssl.h>
+
+namespace IceSSL
+{
+
+namespace OpenSSL
+{
+
+typedef std::map<int,RSAPrivateKeyPtr> RSAMap;
+typedef std::map<int,DHParamsPtr> DHMap;
+
+typedef std::map<int,CertificateDesc> RSACertMap;
+typedef std::map<int,DiffieHellmanParamsFile> DHParamsMap;
+
+class PluginI : public PluginBaseI
+{
+public:
+
+ PluginI(const IceInternal::ProtocolPluginFacadePtr&);
+ ~PluginI();
+
+ virtual IceSSL::ConnectionPtr createConnection(ContextType, int);
+
+ virtual bool isConfigured(ContextType);
+ virtual void configure();
+ virtual void configure(ContextType);
+ virtual void loadConfig(ContextType, const std::string&, const std::string&);
+
+ // Returns the desired RSA Key, or creates it if not already created.
+ // This is public because the tmpRSACallback must be able to access it.
+ RSA* getRSAKey(int, int);
+
+ // Returns the desired DH Params. If the Params do not already exist, and the key
+ // requested is a 512bit or 1024bit key, we use the compiled-in temporary params.
+ // If the key is some other length, we read the desired key, based on length,
+ // from a DH Param file.
+ // This is public because the tmpDHCallback must be able to access it.
+ DH* getDHParams(int, int);
+
+ virtual void setCertificateVerifier(ContextType, const IceSSL::CertificateVerifierPtr&);
+
+ virtual void addTrustedCertificateBase64(ContextType, const std::string&);
+
+ virtual void addTrustedCertificate(ContextType, const Ice::ByteSeq&);
+
+ virtual void setRSAKeysBase64(ContextType, const std::string&, const std::string&);
+
+ virtual void setRSAKeys(ContextType, const Ice::ByteSeq&, const Ice::ByteSeq&);
+
+ virtual IceSSL::CertificateVerifierPtr getDefaultCertVerifier();
+
+ virtual IceSSL::CertificateVerifierPtr getSingleCertVerifier(const Ice::ByteSeq&);
+
+ virtual void destroy();
+
+private:
+
+ ServerContext _serverContext;
+ ClientContext _clientContext;
+
+ // Mutex to ensure synchronization of calls to configure
+ // the contexts and calls to create connections.
+ IceUtil::RecMutex _configMutex;
+
+ // Keep a cache of all temporary RSA keys.
+ RSAMap _tempRSAKeys;
+ IceUtil::Mutex _tempRSAKeysMutex;
+
+ // Keep a cache of all temporary Diffie-Hellman keys.
+ DHMap _tempDHKeys;
+ IceUtil::Mutex _tempDHKeysMutex;
+
+ // Maps of all temporary keying information.
+ // The files themselves will not be loaded until
+ // needed.
+ RSACertMap _tempRSAFileMap;
+ DHParamsMap _tempDHParamsFileMap;
+
+ // Flag as to whether the Random Number system has been seeded.
+ int _randSeeded;
+
+ // Cryptographic Random Number System related routines.
+ int seedRand();
+ long loadRandFiles(const std::string&);
+ void initRandSystem(const std::string&);
+
+ // Load the temporary (ephemeral) certificates for Server operations.
+ void loadTempCerts(TempCertificates&);
+};
+
+}
+
+}
+
+#endif