summaryrefslogtreecommitdiff
path: root/test/encryption_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-19 21:46:01 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-19 21:46:01 +0000
commit7702e5d643440e75369078863b34f8a574ee4143 (patch)
treee01edc51718fd6c475b449748ff7fa6e5c526bc9 /test/encryption_test.cc
parentc91aa27e13703874c944fed763b5b039ceae71d2 (diff)
Considerable re-work of KDM class to express the difference between encrypted and unencrypted KDMs.
Diffstat (limited to 'test/encryption_test.cc')
-rw-r--r--test/encryption_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index 8fe34ddd..a4bc0600 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -17,7 +17,6 @@
*/
-#include "kdm.h"
#include "KM_util.h"
#include "metadata.h"
#include "certificates.h"
@@ -35,6 +34,8 @@
#include "subtitle_content.h"
#include "reel_mono_picture_asset.h"
#include "reel_sound_asset.h"
+#include "encrypted_kdm.h"
+#include "decrypted_kdm.h"
#include <sndfile.h>
#include <boost/test/unit_test.hpp>
#include <boost/shared_ptr.hpp>
@@ -123,17 +124,16 @@ BOOST_AUTO_TEST_CASE (encryption_test)
d.add (cpl);
d.write_xml (dcp::SMPTE, xml_metadata, signer);
- dcp::KDM kdm (
+ dcp::DecryptedKDM kdm (
cpl,
- signer,
- signer->certificates().leaf(),
- boost::posix_time::time_from_string ("2013-01-01 00:00:00"),
- boost::posix_time::time_from_string ("2017-01-08 00:00:00"),
+ dcp::LocalTime ("2013-01-01T00:00:00+00:00"),
+ dcp::LocalTime ("2017-01-08T00:00:00+00:00"),
"libdcp",
+ "test",
"2012-07-17T04:45:18+00:00"
);
- kdm.as_xml ("build/test/bar.kdm.xml");
+ kdm.encrypt(signer, signer->certificates().leaf()).as_xml ("build/test/bar.kdm.xml");
int r = system (
"xmllint --path schema --nonet --noout --schema schema/SMPTE-430-1-2006-Amd-1-2009-KDM.xsd build/test/bar.kdm.xml "