summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-03-19 21:24:54 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-19 21:24:54 +0100
commit6fecf18d3bbeb9e670d7c53de926ffddd0c7fef0 (patch)
tree09d1c77855c6ec30ee2119421c9a4227a092d613 /src
parente08f446c1f73b0190facbd9893a10897fbbf1033 (diff)
Remove old MODIFIED_TRANSITIONAL_TEST.
Diffstat (limited to 'src')
-rw-r--r--src/encrypted_kdm.cc58
-rw-r--r--src/types.h2
2 files changed, 28 insertions, 32 deletions
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc
index dec2efcd..986f82e4 100644
--- a/src/encrypted_kdm.cc
+++ b/src/encrypted_kdm.cc
@@ -648,37 +648,35 @@ EncryptedKDM::EncryptedKDM (
kre.disable_forensic_marking_picture = disable_forensic_marking_picture;
kre.disable_forensic_marking_audio = disable_forensic_marking_audio;
- if (formulation != Formulation::MODIFIED_TRANSITIONAL_TEST) {
- kre.authorized_device_info = data::AuthorizedDeviceInfo ();
- kre.authorized_device_info->device_list_identifier = make_uuid ();
- auto n = recipient.subject_common_name ();
- if (n.find (".") != string::npos) {
- n = n.substr (n.find (".") + 1);
- }
- kre.authorized_device_info->device_list_description = n;
-
- if (formulation == Formulation::MODIFIED_TRANSITIONAL_1 || formulation == Formulation::DCI_ANY) {
- /* Use the "assume trust" thumbprint */
+ kre.authorized_device_info = data::AuthorizedDeviceInfo ();
+ kre.authorized_device_info->device_list_identifier = make_uuid ();
+ auto n = recipient.subject_common_name ();
+ if (n.find (".") != string::npos) {
+ n = n.substr (n.find (".") + 1);
+ }
+ kre.authorized_device_info->device_list_description = n;
+
+ if (formulation == Formulation::MODIFIED_TRANSITIONAL_1 || formulation == Formulation::DCI_ANY) {
+ /* Use the "assume trust" thumbprint */
+ kre.authorized_device_info->certificate_thumbprints.push_back ("2jmj7l5rSw0yVb/vlWAYkK/YBwk=");
+ } else if (formulation == Formulation::MULTIPLE_MODIFIED_TRANSITIONAL_1 || formulation == Formulation::DCI_SPECIFIC) {
+ if (trusted_devices.empty ()) {
+ /* Fall back on the "assume trust" thumbprint so we
+ can generate "modified-transitional-1" KDMs
+ together with "multiple-modified-transitional-1"
+ KDMs in one go, and similarly for "dci-any" etc.
+ */
kre.authorized_device_info->certificate_thumbprints.push_back ("2jmj7l5rSw0yVb/vlWAYkK/YBwk=");
- } else if (formulation == Formulation::MULTIPLE_MODIFIED_TRANSITIONAL_1 || formulation == Formulation::DCI_SPECIFIC) {
- if (trusted_devices.empty ()) {
- /* Fall back on the "assume trust" thumbprint so we
- can generate "modified-transitional-1" KDMs
- together with "multiple-modified-transitional-1"
- KDMs in one go, and similarly for "dci-any" etc.
- */
- kre.authorized_device_info->certificate_thumbprints.push_back ("2jmj7l5rSw0yVb/vlWAYkK/YBwk=");
- } else {
- /* As I read the standard we should use the
- recipient /and/ other trusted device thumbprints
- here. MJD reports that this doesn't work with
- his setup; a working KDM does not include the
- recipient's thumbprint (recipient.thumbprint()).
- Waimea uses only the trusted devices here, too.
- */
- for (auto i: trusted_devices) {
- kre.authorized_device_info->certificate_thumbprints.push_back(i);
- }
+ } else {
+ /* As I read the standard we should use the
+ recipient /and/ other trusted device thumbprints
+ here. MJD reports that this doesn't work with
+ his setup; a working KDM does not include the
+ recipient's thumbprint (recipient.thumbprint()).
+ Waimea uses only the trusted devices here, too.
+ */
+ for (auto i: trusted_devices) {
+ kre.authorized_device_info->certificate_thumbprints.push_back(i);
}
}
}
diff --git a/src/types.h b/src/types.h
index b68402af..9fdb93ca 100644
--- a/src/types.h
+++ b/src/types.h
@@ -289,8 +289,6 @@ enum class Formulation {
MULTIPLE_MODIFIED_TRANSITIONAL_1,
DCI_ANY,
DCI_SPECIFIC,
- /** For testing: adds no AuthorizedDeviceInfo tag */
- MODIFIED_TRANSITIONAL_TEST
};