mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
cleanup
This commit is contained in:
@@ -32,8 +32,8 @@ class NetSSL_API CertificateHandlerFactoryMgr
|
|||||||
/// A CertificateHandlerFactoryMgr manages all existing CertificateHandlerFactories.
|
/// A CertificateHandlerFactoryMgr manages all existing CertificateHandlerFactories.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<std::string, Poco::SharedPtr<CertificateHandlerFactory> > FactoriesMap;
|
using FactoriesMap = std::map<std::string, Poco::SharedPtr<CertificateHandlerFactory>>;
|
||||||
|
|
||||||
CertificateHandlerFactoryMgr();
|
CertificateHandlerFactoryMgr();
|
||||||
/// Creates the CertificateHandlerFactoryMgr.
|
/// Creates the CertificateHandlerFactoryMgr.
|
||||||
|
|
||||||
@@ -46,12 +46,12 @@ public:
|
|||||||
|
|
||||||
bool hasFactory(const std::string& name) const;
|
bool hasFactory(const std::string& name) const;
|
||||||
/// Returns true if for the given name a factory is already registered
|
/// Returns true if for the given name a factory is already registered
|
||||||
|
|
||||||
const CertificateHandlerFactory* getFactory(const std::string& name) const;
|
const CertificateHandlerFactory* getFactory(const std::string& name) const;
|
||||||
/// Returns NULL if for the given name a factory does not exist, otherwise the factory is returned
|
/// Returns NULL if for the given name a factory does not exist, otherwise the factory is returned
|
||||||
|
|
||||||
void removeFactory(const std::string& name);
|
void removeFactory(const std::string& name);
|
||||||
/// Removes the factory from the manager.
|
/// Removes the factory from the manager.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FactoriesMap _factories;
|
FactoriesMap _factories;
|
||||||
|
@@ -59,7 +59,7 @@ class NetSSL_API Context: public Poco::RefCountedObject
|
|||||||
/// cipher configuration (cipherList).
|
/// cipher configuration (cipherList).
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Poco::AutoPtr<Context> Ptr;
|
using Ptr = Poco::AutoPtr<Context>;
|
||||||
|
|
||||||
enum Usage
|
enum Usage
|
||||||
{
|
{
|
||||||
@@ -412,9 +412,11 @@ inline Context::Usage Context::usage() const
|
|||||||
inline bool Context::isForServerUse() const
|
inline bool Context::isForServerUse() const
|
||||||
{
|
{
|
||||||
return _usage == SERVER_USE
|
return _usage == SERVER_USE
|
||||||
|
|| _usage == TLS_SERVER_USE
|
||||||
|| _usage == TLSV1_SERVER_USE
|
|| _usage == TLSV1_SERVER_USE
|
||||||
|| _usage == TLSV1_1_SERVER_USE
|
|| _usage == TLSV1_1_SERVER_USE
|
||||||
|| _usage == TLSV1_2_SERVER_USE;
|
|| _usage == TLSV1_2_SERVER_USE
|
||||||
|
|| _usage == TLSV1_3_SERVER_USE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -32,8 +32,8 @@ class NetSSL_API PrivateKeyFactoryMgr
|
|||||||
/// A PrivateKeyFactoryMgr manages all existing PrivateKeyFactories.
|
/// A PrivateKeyFactoryMgr manages all existing PrivateKeyFactories.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef std::map<std::string, Poco::SharedPtr<PrivateKeyFactory> > FactoriesMap;
|
using FactoriesMap = std::map<std::string, Poco::SharedPtr<PrivateKeyFactory>>;
|
||||||
|
|
||||||
PrivateKeyFactoryMgr();
|
PrivateKeyFactoryMgr();
|
||||||
/// Creates the PrivateKeyFactoryMgr.
|
/// Creates the PrivateKeyFactoryMgr.
|
||||||
|
|
||||||
@@ -46,12 +46,12 @@ public:
|
|||||||
|
|
||||||
bool hasFactory(const std::string& name) const;
|
bool hasFactory(const std::string& name) const;
|
||||||
/// Returns true if for the given name a factory is already registered
|
/// Returns true if for the given name a factory is already registered
|
||||||
|
|
||||||
const PrivateKeyFactory* getFactory(const std::string& name) const;
|
const PrivateKeyFactory* getFactory(const std::string& name) const;
|
||||||
/// Returns NULL if for the given name a factory does not exist, otherwise the factory is returned
|
/// Returns NULL if for the given name a factory does not exist, otherwise the factory is returned
|
||||||
|
|
||||||
void removeFactory(const std::string& name);
|
void removeFactory(const std::string& name);
|
||||||
/// Removes the factory from the manager.
|
/// Removes the factory from the manager.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FactoriesMap _factories;
|
FactoriesMap _factories;
|
||||||
|
@@ -157,8 +157,8 @@ class NetSSL_API SSLManager
|
|||||||
/// Please see the Context class documentation regarding TLSv1.3 support.
|
/// Please see the Context class documentation regarding TLSv1.3 support.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Poco::SharedPtr<PrivateKeyPassphraseHandler> PrivateKeyPassphraseHandlerPtr;
|
using PrivateKeyPassphraseHandlerPtr = Poco::SharedPtr<PrivateKeyPassphraseHandler>;
|
||||||
typedef Poco::SharedPtr<InvalidCertificateHandler> InvalidCertificateHandlerPtr;
|
using InvalidCertificateHandlerPtr = Poco::SharedPtr<InvalidCertificateHandler>;
|
||||||
|
|
||||||
Poco::BasicEvent<VerificationErrorArgs> ServerVerificationError;
|
Poco::BasicEvent<VerificationErrorArgs> ServerVerificationError;
|
||||||
/// Fired whenever a certificate verification error is detected by the server during a handshake.
|
/// Fired whenever a certificate verification error is detected by the server during a handshake.
|
||||||
|
@@ -37,16 +37,16 @@ class NetSSL_API Session: public Poco::RefCountedObject
|
|||||||
/// if it wants to reuse it with a future connection.
|
/// if it wants to reuse it with a future connection.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Poco::AutoPtr<Session> Ptr;
|
using Ptr = Poco::AutoPtr<Session>;
|
||||||
|
|
||||||
SSL_SESSION* sslSession() const;
|
SSL_SESSION* sslSession() const;
|
||||||
/// Returns the stored OpenSSL SSL_SESSION object.
|
/// Returns the stored OpenSSL SSL_SESSION object.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Session(SSL_SESSION* pSession);
|
Session(SSL_SESSION* pSession);
|
||||||
/// Creates a new Session object, using the given
|
/// Creates a new Session object, using the given
|
||||||
/// SSL_SESSION object.
|
/// SSL_SESSION object.
|
||||||
///
|
///
|
||||||
/// The SSL_SESSION's reference count is not changed.
|
/// The SSL_SESSION's reference count is not changed.
|
||||||
|
|
||||||
~Session();
|
~Session();
|
||||||
@@ -59,7 +59,7 @@ private:
|
|||||||
Session();
|
Session();
|
||||||
|
|
||||||
SSL_SESSION* _pSession;
|
SSL_SESSION* _pSession;
|
||||||
|
|
||||||
friend class SecureSocketImpl;
|
friend class SecureSocketImpl;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user