From 27e1378bede33c51835fd6307239692909d834d8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 8 Nov 2018 23:56:52 +0000 Subject: Take thumbprint rather than a full dcp::Certificate for trusted devices. --- src/decrypted_kdm.cc | 2 +- src/decrypted_kdm.h | 6 +++--- src/encrypted_kdm.cc | 7 ++++--- src/encrypted_kdm.h | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc index 0fa95f9a..756028d1 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -305,7 +305,7 @@ EncryptedKDM DecryptedKDM::encrypt ( shared_ptr signer, Certificate recipient, - vector trusted_devices, + vector trusted_devices, Formulation formulation, bool disable_forensic_marking_picture, optional disable_forensic_marking_audio diff --git a/src/decrypted_kdm.h b/src/decrypted_kdm.h index 7ae1d161..1cf1e0d4 100644 --- a/src/decrypted_kdm.h +++ b/src/decrypted_kdm.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2017 Carl Hetherington + Copyright (C) 2013-2018 Carl Hetherington This file is part of libdcp. @@ -121,7 +121,7 @@ public: /** Encrypt this KDM's keys and sign the whole KDM. * @param signer Chain to sign with. * @param recipient Certificate of the projector/server which should receive this KDM's keys. - * @param trusted_devices Extra trusted devices which should be written to the KDM (recipient will be written + * @param trusted_devices Thumbprints of extra trusted devices which should be written to the KDM (recipient will be written * as a trusted device automatically and does not need to be included in this list). * @param formulation Formulation to use for the encrypted KDM. * @param disable_forensic_marking_picture true to disable forensic marking of picture. @@ -132,7 +132,7 @@ public: EncryptedKDM encrypt ( boost::shared_ptr signer, Certificate recipient, - std::vector trusted_devices, + std::vector trusted_devices, Formulation formulation, bool disable_forensic_marking_picture, boost::optional disable_forensic_marking_audio diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc index 7a7d98c1..23052f8a 100644 --- a/src/encrypted_kdm.cc +++ b/src/encrypted_kdm.cc @@ -576,10 +576,11 @@ EncryptedKDM::EncryptedKDM (string s) } } +/** @param trusted_devices Trusted device thumbprints */ EncryptedKDM::EncryptedKDM ( shared_ptr signer, Certificate recipient, - vector trusted_devices, + vector trusted_devices, string cpl_id, string content_title_text, optional annotation_text, @@ -651,8 +652,8 @@ EncryptedKDM::EncryptedKDM ( recipient's thumbprint (recipient.thumbprint()). Waimea uses only the trusted devices here, too. */ - BOOST_FOREACH (Certificate const & i, trusted_devices) { - kre.authorized_device_info->certificate_thumbprints.push_back (i.thumbprint ()); + BOOST_FOREACH (string i, trusted_devices) { + kre.authorized_device_info->certificate_thumbprints.push_back (i); } } } diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h index 3ac15864..e52fa0a1 100644 --- a/src/encrypted_kdm.h +++ b/src/encrypted_kdm.h @@ -103,7 +103,7 @@ private: EncryptedKDM ( boost::shared_ptr signer, Certificate recipient, - std::vector trusted_devices, + std::vector trusted_devices, std::string cpl_id, std::string cpl_content_title_text, boost::optional annotation_text, -- cgit v1.2.3