mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 18:22:59 +02:00
#3299: NetSSL: Allow per-Context InvalidCertificateHandler
This commit is contained in:
@@ -278,6 +278,10 @@ protected:
|
||||
/// Throws a InvalidStateException if not application instance
|
||||
/// is available.
|
||||
|
||||
int contextIndex() const;
|
||||
/// Returns the index for SSL_CTX_set_ex_data() and SSL_CTX_get_ex_data() to
|
||||
/// store the Context* in the underlying SSL_CTX.
|
||||
|
||||
private:
|
||||
SSLManager();
|
||||
/// Creates the SSLManager.
|
||||
@@ -310,6 +314,7 @@ private:
|
||||
Context::Ptr _ptrDefaultClientContext;
|
||||
PrivateKeyPassphraseHandlerPtr _ptrClientPassphraseHandler;
|
||||
InvalidCertificateHandlerPtr _ptrClientCertificateHandler;
|
||||
int _contextIndex;
|
||||
Poco::FastMutex _mutex;
|
||||
|
||||
static const std::string CFG_PRIV_KEY_FILE;
|
||||
@@ -389,6 +394,12 @@ inline int SSLManager::verifyClientCallback(int ok, X509_STORE_CTX* pStore)
|
||||
}
|
||||
|
||||
|
||||
inline int SSLManager::contextIndex() const
|
||||
{
|
||||
return _contextIndex;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::Net
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user