summaryrefslogtreecommitdiff
path: root/src/lib/config.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-07-18 13:12:41 +0100
committerCarl Hetherington <cth@carlh.net>2014-07-18 13:12:41 +0100
commit5ea52a08f45b0cb8b8fe7221244cdcdeeaca0ed7 (patch)
treeff9b2d893caa5a1d2914b52e98112f22fb96bdec /src/lib/config.h
parent684da6bed46635f72d93c57a8721b63aa7e10ed5 (diff)
Keep signing certificates / keys in config.xml rather than on disk; allow configuration.
Diffstat (limited to 'src/lib/config.h')
-rw-r--r--src/lib/config.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index 03dd9c0fe..d8ac75bed 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -29,6 +29,8 @@
#include <boost/signals2.hpp>
#include <boost/filesystem.hpp>
#include <dcp/metadata.h>
+#include <dcp/certificates.h>
+#include <dcp/signer.h>
#include "isdcf_metadata.h"
#include "colour_conversion.h"
@@ -188,6 +190,18 @@ public:
return _kdm_email;
}
+ boost::shared_ptr<const dcp::Signer> signer () const {
+ return _signer;
+ }
+
+ dcp::Certificate decryption_certificate () const {
+ return _decryption_certificate;
+ }
+
+ std::string decryption_private_key () const {
+ return _decryption_private_key;
+ }
+
bool check_for_updates () const {
return _check_for_updates;
}
@@ -357,6 +371,21 @@ public:
void reset_kdm_email ();
+ void set_signer (boost::shared_ptr<const dcp::Signer> s) {
+ _signer = s;
+ changed ();
+ }
+
+ void set_decryption_certificate (dcp::Certificate c) {
+ _decryption_certificate = c;
+ changed ();
+ }
+
+ void set_decryption_private_key (std::string k) {
+ _decryption_private_key = k;
+ changed ();
+ }
+
void set_check_for_updates (bool c) {
_check_for_updates = c;
changed ();
@@ -377,8 +406,6 @@ public:
changed ();
}
- boost::filesystem::path signer_chain_directory () const;
-
void changed ();
boost::signals2::signal<void ()> Changed;
@@ -435,6 +462,9 @@ private:
std::string _kdm_from;
std::string _kdm_cc;
std::string _kdm_email;
+ boost::shared_ptr<const dcp::Signer> _signer;
+ dcp::Certificate _decryption_certificate;
+ std::string _decryption_private_key;
/** true to check for updates on startup */
bool _check_for_updates;
bool _check_for_test_updates;