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

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