mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 15:19:21 +01:00
RSAKeyImpl #2201
This commit is contained in:
@@ -55,7 +55,7 @@ RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert):
|
|||||||
|
|
||||||
|
|
||||||
RSAKeyImpl::RSAKeyImpl(const PKCS12Container& cont):
|
RSAKeyImpl::RSAKeyImpl(const PKCS12Container& cont):
|
||||||
KeyPairImpl("ec", KT_EC_IMPL),
|
KeyPairImpl("rsa", KT_RSA_IMPL),
|
||||||
_pRSA(0)
|
_pRSA(0)
|
||||||
{
|
{
|
||||||
EVPPKey key = cont.getKey();
|
EVPPKey key = cont.getKey();
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
#include "PKCS12ContainerTest.h"
|
#include "PKCS12ContainerTest.h"
|
||||||
#include "CppUnit/TestCaller.h"
|
#include "CppUnit/TestCaller.h"
|
||||||
#include "CppUnit/TestSuite.h"
|
#include "CppUnit/TestSuite.h"
|
||||||
|
#include "Poco/Crypto/EVPPKey.h"
|
||||||
|
#include "Poco/Crypto/RSAKey.h"
|
||||||
|
#include "Poco/Crypto/KeyPairImpl.h"
|
||||||
#include "Poco/Environment.h"
|
#include "Poco/Environment.h"
|
||||||
#include "Poco/Path.h"
|
#include "Poco/Path.h"
|
||||||
#include "Poco/File.h"
|
#include "Poco/File.h"
|
||||||
@@ -20,6 +23,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
using namespace Poco::Crypto;
|
using namespace Poco::Crypto;
|
||||||
using Poco::Environment;
|
using Poco::Environment;
|
||||||
using Poco::Path;
|
using Poco::Path;
|
||||||
@@ -82,6 +86,9 @@ void PKCS12ContainerTest::full(const PKCS12Container& pkcs12)
|
|||||||
EVPPKey pKey = pkcs12.getKey();
|
EVPPKey pKey = pkcs12.getKey();
|
||||||
assert (EVP_PKEY_RSA == pKey.type());
|
assert (EVP_PKEY_RSA == pKey.type());
|
||||||
|
|
||||||
|
RSAKey rsa(pkcs12);
|
||||||
|
assert (rsa.impl()->type() == KeyPairImpl::KT_RSA_IMPL);
|
||||||
|
|
||||||
assert (pkcs12.hasX509Certificate());
|
assert (pkcs12.hasX509Certificate());
|
||||||
fullCert(pkcs12.getX509Certificate());
|
fullCert(pkcs12.getX509Certificate());
|
||||||
|
|
||||||
|
|||||||
2
openssl
2
openssl
Submodule openssl updated: b42dcf2175...26b1673caa
Reference in New Issue
Block a user