diff --git a/Crypto/src/RSAKeyImpl.cpp b/Crypto/src/RSAKeyImpl.cpp index 15e65ecce..8aa3890b9 100644 --- a/Crypto/src/RSAKeyImpl.cpp +++ b/Crypto/src/RSAKeyImpl.cpp @@ -55,7 +55,7 @@ RSAKeyImpl::RSAKeyImpl(const X509Certificate& cert): RSAKeyImpl::RSAKeyImpl(const PKCS12Container& cont): - KeyPairImpl("ec", KT_EC_IMPL), + KeyPairImpl("rsa", KT_RSA_IMPL), _pRSA(0) { EVPPKey key = cont.getKey(); diff --git a/Crypto/testsuite/src/PKCS12ContainerTest.cpp b/Crypto/testsuite/src/PKCS12ContainerTest.cpp index c8e4e8621..2dfe051ff 100644 --- a/Crypto/testsuite/src/PKCS12ContainerTest.cpp +++ b/Crypto/testsuite/src/PKCS12ContainerTest.cpp @@ -11,6 +11,9 @@ #include "PKCS12ContainerTest.h" #include "CppUnit/TestCaller.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/Path.h" #include "Poco/File.h" @@ -20,6 +23,7 @@ #include + using namespace Poco::Crypto; using Poco::Environment; using Poco::Path; @@ -82,6 +86,9 @@ void PKCS12ContainerTest::full(const PKCS12Container& pkcs12) EVPPKey pKey = pkcs12.getKey(); assert (EVP_PKEY_RSA == pKey.type()); + RSAKey rsa(pkcs12); + assert (rsa.impl()->type() == KeyPairImpl::KT_RSA_IMPL); + assert (pkcs12.hasX509Certificate()); fullCert(pkcs12.getX509Certificate()); diff --git a/openssl b/openssl index b42dcf217..26b1673ca 160000 --- a/openssl +++ b/openssl @@ -1 +1 @@ -Subproject commit b42dcf2175f30e0c21dc9a684f0b9670f4ed09c8 +Subproject commit 26b1673caad94a702b6d694f48f917a283b30777