This commit is contained in:
Alex Fabijanic
2018-03-05 20:04:25 -06:00
parent 8dc4223acb
commit 20f9320f2d
3 changed files with 9 additions and 2 deletions

View File

@@ -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();

View File

@@ -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());

Submodule openssl updated: b42dcf2175...26b1673caa