latest sources from main repository

This commit is contained in:
Guenter Obiltschnig
2007-06-13 15:15:43 +00:00
parent f7b1357ec6
commit e701c977f5
9 changed files with 69 additions and 50 deletions

View File

@@ -1,7 +1,7 @@
//
// CertificateHandlerFactory.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/include/Poco/Net/CertificateHandlerFactory.h#6 $
// $Id: //poco/Main/NetSSL_OpenSSL/include/Poco/Net/CertificateHandlerFactory.h#7 $
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
@@ -82,22 +82,32 @@ public:
/// Destroys the CertificateHandlerFactoryRegistrar.
};
template <typename T>
class CertificateHandlerFactoryImpl: public Poco::Net::CertificateHandlerFactory
{
public:
CertificateHandlerFactoryImpl()
{
}
#define POCO_REGISTER_CHFACTORY(API, PKCLS) \
class API PKCLS##Factory: public Poco::Net::CertificateHandlerFactory \
{ \
public: \
PKCLS##Factory(){} \
~PKCLS##Factory(){} \
Poco::Net::InvalidCertificateHandler* create(bool server) const \
{ \
return new PKCLS(server); \
} \
}; \
static Poco::Net::CertificateHandlerFactoryRegistrar aRegistrar(std::string(#PKCLS), new PKCLS##Factory());
~CertificateHandlerFactoryImpl()
{
}
InvalidCertificateHandler* create(bool server) const
{
return new T(server);
}
};
} } // namespace Poco::Net
// DEPRECATED: register the factory directly at the FactoryMgr:
// Poco::Net::SSLManager::instance().certificateHandlerFactoryMgr().setFactory(name, new Poco::Net::CertificateHandlerFactoryImpl<MyConsoleHandler>());
#define POCO_REGISTER_CHFACTORY(API, PKCLS) \
static Poco::Net::CertificateHandlerFactoryRegistrar aRegistrar(std::string(#PKCLS), new Poco::Net::CertificateHandlerFactoryImpl<PKCLS>());
#endif // NetSSL_CertificateHandlerFactory_INCLUDED

View File

@@ -1,7 +1,7 @@
//
// PrivateKeyFactory.h
//
// $Id: //poco/Main/NetSSL_OpenSSL/include/Poco/Net/PrivateKeyFactory.h#6 $
// $Id: //poco/Main/NetSSL_OpenSSL/include/Poco/Net/PrivateKeyFactory.h#7 $
//
// Library: NetSSL_OpenSSL
// Package: SSLCore
@@ -84,21 +84,32 @@ public:
};
#define POCO_REGISTER_KEYFACTORY(API, PKCLS) \
class API PKCLS##Factory: public Poco::Net::PrivateKeyFactory \
{ \
public: \
PKCLS##Factory(){} \
~PKCLS##Factory(){} \
Poco::Net::PrivateKeyPassphraseHandler* create(bool server) const \
{ \
return new PKCLS(server); \
} \
}; \
static Poco::Net::PrivateKeyFactoryRegistrar aRegistrar(std::string(#PKCLS), new PKCLS##Factory());
template<typename T>
class PrivateKeyFactoryImpl: public Poco::Net::PrivateKeyFactory
{
public:
PrivateKeyFactoryImpl()
{
}
~PrivateKeyFactoryImpl()
{
}
PrivateKeyPassphraseHandler* create(bool server) const
{
return new T(server);
}
};
} } // namespace Poco::Net
// DEPRECATED: register the factory directly at the FactoryMgr:
// Poco::Net::SSLManager::instance().privateKeyFactoryMgr().setFactory(name, new Poco::Net::PrivateKeyFactoryImpl<MyKeyHandler>());
#define POCO_REGISTER_KEYFACTORY(API, PKCLS) \
static Poco::Net::PrivateKeyFactoryRegistrar aRegistrar(std::string(#PKCLS), new Poco::Net::PrivateKeyFactoryImpl<PKCLS>());
#endif // NetSSL_PrivateKeyFactory_INCLUDED