mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 21:50:47 +01:00
add capability to construct EVPPKey from ECKey and RSAKey; RSA EVPPKey tests, RSA KeyPairImpl type bugfix
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
|
||||
#include "Poco/Crypto/EVPPKey.h"
|
||||
#include "Poco/Crypto/ECKey.h"
|
||||
#include "Poco/Crypto/RSAKey.h"
|
||||
#include "Poco/NumberFormatter.h"
|
||||
|
||||
|
||||
@@ -131,4 +133,19 @@ err:
|
||||
}
|
||||
|
||||
|
||||
void EVPPKey::setKey(ECKey* pKey)
|
||||
{
|
||||
poco_check_ptr(pKey);
|
||||
poco_check_ptr(pKey->impl());
|
||||
setKey(pKey->impl()->getECKey());
|
||||
}
|
||||
|
||||
|
||||
void EVPPKey::setKey(RSAKey* pKey)
|
||||
{
|
||||
poco_check_ptr(pKey);
|
||||
poco_check_ptr(pKey->impl());
|
||||
setKey(pKey->impl()->getRSA());
|
||||
}
|
||||
|
||||
} } // namespace Poco::Crypto
|
||||
|
||||
Reference in New Issue
Block a user