Throw an exception if we try to make KDMs for an unencrypted project (#1188).
authorCarl Hetherington <cth@carlh.net>
Mon, 5 Feb 2018 00:40:51 +0000 (00:40 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 5 Feb 2018 00:40:51 +0000 (00:40 +0000)
cscript
src/lib/film.cc

diff --git a/cscript b/cscript
index 1d99e27c9153d74f377af8976b29c919d324e134..984295774def1f07f04d4587124330b65dd6a3fd 100644 (file)
--- a/cscript
+++ b/cscript
@@ -283,8 +283,8 @@ def dependencies(target):
         ffmpeg_options = {}
 
     return (('ffmpeg-cdist', '5fce90f', ffmpeg_options),
-            ('libdcp', '0a47e4c'),
-            ('libsub', '688c501'),
+            ('libdcp', 'f19fba7'),
+            ('libsub', 'c6193e4'),
             ('rtaudio-cdist', None))
 
 def configure_options(target):
index 386f456b51317e909f5fefabf300bf82d2a2b2fb..2b045f5c4c2fcef84503e4dc32874501deb94420 100644 (file)
@@ -1218,6 +1218,10 @@ Film::make_kdm (
        dcp::Formulation formulation
        ) const
 {
+       if (!_encrypted) {
+               throw runtime_error (_("Cannot make a KDM as this project is not encrypted."));
+       }
+
        shared_ptr<const dcp::CPL> cpl (new dcp::CPL (cpl_file));
        shared_ptr<const dcp::CertificateChain> signer = Config::instance()->signer_chain ();
        if (!signer->valid ()) {