From 0bf04f1817f97e70a918aa12369e04699ae10f46 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 12 Feb 2022 21:22:40 +0100 Subject: Pass certificate validity length into the constructor. --- test/certificates_test.cc | 5 +++-- test/round_trip_test.cc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/certificates_test.cc b/test/certificates_test.cc index 927bddaf..0c671fc3 100644 --- a/test/certificates_test.cc +++ b/test/certificates_test.cc @@ -215,6 +215,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", @@ -228,7 +229,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()); } @@ -244,7 +245,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 ()); } diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc index c5ad414c..add00651 100644 --- a/test/round_trip_test.cc +++ b/test/round_trip_test.cc @@ -65,7 +65,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) { - auto signer = make_shared(boost::filesystem::path ("openssl")); + auto signer = make_shared(boost::filesystem::path("openssl"), 10 * 365); boost::filesystem::path work_dir = "build/test/round_trip_test"; boost::filesystem::create_directory (work_dir); -- cgit v1.2.3