summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-16 00:10:16 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-16 00:10:16 +0100
commit92bec5911dc89d08f2a04fbdcfc32a8f274a5065 (patch)
tree693c5cdcc421e7af4a5bf8eff8a19f36fa09dbff /src
parentbeb6a305c07342b0e4611d94e95f9d18416beb27 (diff)
Pass annotation text from decrypted to encrypted KDMs.
Diffstat (limited to 'src')
-rw-r--r--src/decrypted_kdm.cc1
-rw-r--r--src/encrypted_kdm.cc2
-rw-r--r--src/encrypted_kdm.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc
index 6aba26de..b18d9a90 100644
--- a/src/decrypted_kdm.cc
+++ b/src/decrypted_kdm.cc
@@ -310,6 +310,7 @@ DecryptedKDM::encrypt (shared_ptr<const CertificateChain> signer, Certificate re
device_list_description,
_keys.front().cpl_id (),
_content_title_text,
+ _annotation_text,
_not_valid_before,
_not_valid_after,
formulation,
diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc
index 8ed0c315..0e10a528 100644
--- a/src/encrypted_kdm.cc
+++ b/src/encrypted_kdm.cc
@@ -519,6 +519,7 @@ EncryptedKDM::EncryptedKDM (
string device_list_description,
string cpl_id,
string content_title_text,
+ optional<string> annotation_text,
LocalTime not_valid_before,
LocalTime not_valid_after,
Formulation formulation,
@@ -532,6 +533,7 @@ EncryptedKDM::EncryptedKDM (
data::AuthenticatedPublic& aup = _data->authenticated_public;
aup.signer.x509_issuer_name = signer->leaf().issuer ();
aup.signer.x509_serial_number = signer->leaf().serial ();
+ aup.annotation_text = annotation_text;
data::KDMRequiredExtensions& kre = _data->authenticated_public.required_extensions.kdm_required_extensions;
kre.recipient.x509_issuer_serial.x509_issuer_name = recipient.issuer ();
diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h
index a36e7aaf..13cb1a00 100644
--- a/src/encrypted_kdm.h
+++ b/src/encrypted_kdm.h
@@ -89,6 +89,7 @@ private:
std::string device_list_description,
std::string cpl_id,
std::string cpl_content_title_text,
+ boost::optional<std::string> annotation_text,
LocalTime not_valid_before,
LocalTime not_valid_after,
Formulation formulation,