diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-05 00:40:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-05 00:40:51 +0000 |
| commit | d9b4e65b92e28f9126fac7660d7aba97fc1ca4ad (patch) | |
| tree | a71719c8d5ba18de3e35dcb6bdad137f5e89c1fd | |
| parent | cad7088414d36f6cdcc6f52eef192f78d92f3e07 (diff) | |
Throw an exception if we try to make KDMs for an unencrypted project (#1188).
| -rw-r--r-- | cscript | 4 | ||||
| -rw-r--r-- | src/lib/film.cc | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -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): diff --git a/src/lib/film.cc b/src/lib/film.cc index 386f456b5..2b045f5c4 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -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 ()) { |
