Return to 10-year certificate validity (#2174).
authorCarl Hetherington <cth@carlh.net>
Sat, 12 Feb 2022 15:18:18 +0000 (16:18 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 12 Feb 2022 15:18:18 +0000 (16:18 +0100)
cscript
src/lib/config.cc
src/lib/util.h
src/wx/config_dialog.cc
test/import_dcp_test.cc
test/util_test.cc
test/vf_kdm_test.cc

diff --git a/cscript b/cscript
index e30d9d72e5155fcea6395dd5f3fa1e7858a5d955..5c17de099c7b70280224dfcb4b25f059c2028a5e 100644 (file)
--- a/cscript
+++ b/cscript
@@ -391,8 +391,8 @@ def dependencies(target):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.6.18'))
-    deps.append(('libsub', 'v1.4.25'))
+    deps.append(('libdcp', 'v1.6.19'))
+    deps.append(('libsub', 'v1.4.26'))
     deps.append(('rtaudio-cdist', 'bf0fc23'))
 
     return deps
index a4dea7fd1abb49926a3b709b3f90f1e0bc45209a..9b0cc5f97e512c85161b47a35df9750df580dfda 100644 (file)
@@ -210,6 +210,7 @@ Config::create_certificate_chain ()
        return shared_ptr<dcp::CertificateChain> (
                new dcp::CertificateChain (
                        openssl_path(),
+                       CERTIFICATE_VALIDITY_PERIOD,
                        "dcpomatic.com",
                        "dcpomatic.com",
                        ".dcpomatic.smpte-430-2.ROOT",
index a011da3352ab938eb60c9bc6a112a40f1dda076b..933618d6caf3e65b050f2f8ba660b6f8937de6d7 100644 (file)
@@ -63,6 +63,8 @@ namespace dcp {
 #define CLOSED_CAPTION_LINES 3
 /** Maximum line length of closed caption viewers */
 #define CLOSED_CAPTION_LENGTH 30
+/** Validity period of certificate chains (in days) */
+#define CERTIFICATE_VALIDITY_PERIOD (10 * 365)
 
 extern std::string program_name;
 extern bool is_batch_converter;
index f6fb3c9484036262d8cf74800952e4fa8438d1bf..a057c2e826253bfa86dce1797b07230ea3f729c0 100644 (file)
@@ -699,6 +699,7 @@ CertificateChainEditor::remake_certificates ()
                        shared_ptr<dcp::CertificateChain> (
                                new dcp::CertificateChain (
                                        openssl_path (),
+                                       CERTIFICATE_VALIDITY_PERIOD,
                                        d->organisation (),
                                        d->organisational_unit (),
                                        d->root_common_name (),
index 71689f613c6f2663b377dcbc234079ce3d0275ed..8b0b605a293f122244516670201d16cf4323e2d7 100644 (file)
@@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
        dcp::DCP A_dcp ("build/test/import_dcp_test/" + A->dcp_name());
        A_dcp.read ();
 
-       Config::instance()->set_decryption_chain (shared_ptr<dcp::CertificateChain> (new dcp::CertificateChain (openssl_path ())));
+       Config::instance()->set_decryption_chain (shared_ptr<dcp::CertificateChain> (new dcp::CertificateChain (openssl_path (), CERTIFICATE_VALIDITY_PERIOD)));
 
        dcp::EncryptedKDM kdm = A->make_kdm (
                Config::instance()->decryption_chain()->leaf (),
index 9b2fa989c7b08ebb3657f65c48465a06374a363c..931e2bc1531be3b153927b448434b72b3d45b69c 100644 (file)
@@ -108,6 +108,7 @@ BOOST_AUTO_TEST_CASE (swaroop_chain_test)
        shared_ptr<dcp::CertificateChain> cc (
                new dcp::CertificateChain (
                        openssl_path(),
+                       CERTIFICATE_VALIDITY_PERIOD,
                        "dcpomatic.com",
                        "dcpomatic.com",
                        ".dcpomatic.smpte-430-2.ROOT",
index a28ea5b7e29a6e311b60cec8c9622465616a940d..071adcdb8d904e527b6b82904fe92020655083ea 100644 (file)
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (vf_kdm_test)
        dcp::DCP A_dcp ("build/test/vf_kdm_test_ov/" + A->dcp_name());
        A_dcp.read ();
 
-       Config::instance()->set_decryption_chain (shared_ptr<dcp::CertificateChain> (new dcp::CertificateChain (openssl_path ())));
+       Config::instance()->set_decryption_chain (shared_ptr<dcp::CertificateChain> (new dcp::CertificateChain (openssl_path (), CERTIFICATE_VALIDITY_PERIOD)));
 
        dcp::EncryptedKDM A_kdm = A->make_kdm (
                Config::instance()->decryption_chain()->leaf (),