Keep signing certificates / keys in config.xml rather than on disk; allow configuration.
[dcpomatic.git] / src / lib / film.cc
index 85dc5b168d2012e0d98d78606656fcc221225dd4..eaf738b8ba004b12b4a0c11cbce84924fc4fdc32 100644 (file)
@@ -1078,9 +1078,14 @@ Film::make_kdm (
        ) const
 {
        shared_ptr<const dcp::CPL> cpl (new dcp::CPL (cpl_file));
+       shared_ptr<const dcp::Signer> signer = Config::instance()->signer();
+       if (!signer->valid ()) {
+               throw InvalidSignerError ();
+       }
+       
        return dcp::DecryptedKDM (
                cpl, from, until, "DCP-o-matic", cpl->content_title_text(), dcp::LocalTime().as_string()
-               ).encrypt (make_signer(), target, formulation);
+               ).encrypt (signer, target, formulation);
 }
 
 list<dcp::EncryptedKDM>