mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-13 22:50:17 +02:00
Set EVP private key on SSL context (#2259)
This commit is contained in:

committed by
Aleksandar Fabijanic

parent
612f092235
commit
5fb10f6746
@@ -21,6 +21,7 @@
|
||||
#include "Poco/Net/NetSSL.h"
|
||||
#include "Poco/Net/SocketDefs.h"
|
||||
#include "Poco/Crypto/X509Certificate.h"
|
||||
#include "Poco/Crypto/EVPPKey.h"
|
||||
#include "Poco/Crypto/RSAKey.h"
|
||||
#include "Poco/RefCountedObject.h"
|
||||
#include "Poco/AutoPtr.h"
|
||||
@@ -236,6 +237,16 @@ public:
|
||||
/// must have been setup with the SSLManager, or the SSLManager's PrivateKeyPassphraseRequired
|
||||
/// event must be handled.
|
||||
|
||||
void usePrivateKey(const Poco::Crypto::EVPPKey &pkey);
|
||||
/// Sets the private key to be used by the Context.
|
||||
///
|
||||
/// Note that useCertificate() must always be called before
|
||||
/// usePrivateKey().
|
||||
///
|
||||
/// Note: If the private key is protected by a passphrase, a PrivateKeyPassphraseHandler
|
||||
/// must have been setup with the SSLManager, or the SSLManager's PrivateKeyPassphraseRequired
|
||||
/// event must be handled.
|
||||
|
||||
SSL_CTX* sslContext() const;
|
||||
/// Returns the underlying OpenSSL SSL Context object.
|
||||
|
||||
|
Reference in New Issue
Block a user