summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-01-07 14:29:13 +0000
committerCarl Hetherington <cth@carlh.net>2016-01-07 14:29:13 +0000
commit03fb9d475366b6e02b6bde4421607f7dcd9936ad (patch)
tree3d1acb3242d3f74a408f1864de1bbf2f695e31d0
parent342aad2ddf893aaaafa9a2c9980579d2dc4ec125 (diff)
A couple of hacks to KDMs for testing by Dolby.
-rw-r--r--src/encrypted_kdm.cc6
-rw-r--r--test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml8
2 files changed, 10 insertions, 4 deletions
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc
index 205d591b..132e8df3 100644
--- a/src/encrypted_kdm.cc
+++ b/src/encrypted_kdm.cc
@@ -202,9 +202,13 @@ public:
for (list<string>::const_iterator i = encrypted_key.begin(); i != encrypted_key.end(); ++i) {
xmlpp::Element* encrypted_key = node->add_child ("EncryptedKey", "enc");
+ /* XXX: hack for testing with Dolby */
+ encrypted_key->set_namespace_declaration ("http://www.w3.org/2001/04/xmlenc#", "enc");
xmlpp::Element* encryption_method = encrypted_key->add_child ("EncryptionMethod", "enc");
encryption_method->set_attribute ("Algorithm", "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p");
xmlpp::Element* digest_method = encryption_method->add_child ("DigestMethod", "ds");
+ /* XXX: hack for testing with Dolby */
+ digest_method->set_namespace_declaration ("http://www.w3.org/2000/09/xmldsig#", "ds");
digest_method->set_attribute ("Algorithm", "http://www.w3.org/2000/09/xmldsig#sha1");
xmlpp::Element* cipher_data = encrypted_key->add_child ("CipherData", "enc");
cipher_data->add_child("CipherValue", "enc")->add_child_text (*i);
@@ -416,6 +420,8 @@ class AuthenticatedPublic
public:
AuthenticatedPublic ()
: message_id (make_uuid ())
+ /* XXX: hack for Dolby to see if there must be a not-empty annotation text */
+ , annotation_text ("none")
, issue_date (LocalTime().as_string ())
{}
diff --git a/test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml b/test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml
index 79949013..9047fa03 100644
--- a/test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml
+++ b/test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml
@@ -49,9 +49,9 @@
<NonCriticalExtensions/>
</AuthenticatedPublic>
<AuthenticatedPrivate Id="ID_AuthenticatedPrivate">
- <enc:EncryptedKey>
+ <enc:EncryptedKey xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
- <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
</enc:EncryptionMethod>
<enc:CipherData>
<enc:CipherValue>BGMEgy18q3BwOD6jMrgxlwjI/FKUVTgcRe1gpTUxg52HZr9Iu3iQo+AhO6hg4ti1
@@ -62,9 +62,9 @@ uC18F2Ad9g1wUf0BITDrtdjC19yTGoPYD+VHuUZvZrIHs5Otw4Buhg1+N3VDc0vz
ffYMzb6hsGwaYKVzPw2W3A==</enc:CipherValue>
</enc:CipherData>
</enc:EncryptedKey>
- <enc:EncryptedKey>
+ <enc:EncryptedKey xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
- <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+ <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"/>
</enc:EncryptionMethod>
<enc:CipherData>
<enc:CipherValue>PAWbXs8QI1+opF9jrcuwqcM1QIl6/pB4zlzvBMpmidiwgqozox1DIMgTt5K9wqV5