summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/certificates_test.cc9
-rw-r--r--test/round_trip_test.cc2
2 files changed, 6 insertions, 5 deletions
diff --git a/test/certificates_test.cc b/test/certificates_test.cc
index 41b2357e..ef75c186 100644
--- a/test/certificates_test.cc
+++ b/test/certificates_test.cc
@@ -201,6 +201,7 @@ BOOST_AUTO_TEST_CASE (certificates_validation9)
{
dcp::CertificateChain good (
boost::filesystem::path ("openssl"),
+ 10 * 365,
"dcpomatic.com",
"dcpomatic.com",
".dcpomatic.smpte-430-2.ROOT",
@@ -214,7 +215,7 @@ BOOST_AUTO_TEST_CASE (certificates_validation9)
/** Check that we can create a valid chain */
BOOST_AUTO_TEST_CASE (certificates_validation10)
{
- dcp::CertificateChain good (boost::filesystem::path ("openssl"));
+ dcp::CertificateChain good (boost::filesystem::path ("openssl"), 10 * 365);
BOOST_CHECK_NO_THROW (good.root_to_leaf());
}
@@ -230,7 +231,7 @@ BOOST_AUTO_TEST_CASE (signer_validation)
BOOST_CHECK (chain.valid ());
/* Put in an unrelated key and the signer should no longer be valid */
- dcp::CertificateChain another_chain (boost::filesystem::path ("openssl"));
+ dcp::CertificateChain another_chain (boost::filesystem::path ("openssl"), 10 * 365);
chain.set_key (another_chain.key().get ());
BOOST_CHECK (!chain.valid ());
}
@@ -238,9 +239,9 @@ BOOST_AUTO_TEST_CASE (signer_validation)
/** Check reading of a certificate chain from a string */
BOOST_AUTO_TEST_CASE (certificate_chain_from_string)
{
- dcp::CertificateChain a (dcp::file_to_string (private_test / "chain.pem"));
+ dcp::CertificateChain a (dcp::file_to_string (private_test / "chain.pem"), 10 * 365);
BOOST_CHECK_EQUAL (a.root_to_leaf().size(), 3);
- dcp::CertificateChain b (dcp::file_to_string ("test/ref/crypt/leaf.signed.pem"));
+ dcp::CertificateChain b (dcp::file_to_string ("test/ref/crypt/leaf.signed.pem"), 10 * 365);
BOOST_CHECK_EQUAL (b.root_to_leaf().size(), 1);
}
diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc
index 9c100124..02818283 100644
--- a/test/round_trip_test.cc
+++ b/test/round_trip_test.cc
@@ -49,7 +49,7 @@ using boost::scoped_array;
/** Build an encrypted picture asset and a KDM for it and check that the KDM can be decrypted */
BOOST_AUTO_TEST_CASE (round_trip_test)
{
- shared_ptr<dcp::CertificateChain> signer (new dcp::CertificateChain (boost::filesystem::path ("openssl")));
+ shared_ptr<dcp::CertificateChain> signer (new dcp::CertificateChain (boost::filesystem::path ("openssl"), 10 * 365));
boost::filesystem::path work_dir = "build/test/round_trip_test";
boost::filesystem::create_directory (work_dir);