From 5e10a6f047d12f1e2e3d0e2f8ee30f93897a2227 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 17 Jan 2025 01:31:38 +0100 Subject: Allow KDMRecipient and hence Screen to convert certs to dcp::Certificate lazily. This is pretty slow (as it runs the certificate through OpenSSL) and we don't need to do it for every certificate in a database when we load the database. --- src/lib/dkdm_recipient.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/dkdm_recipient.cc') diff --git a/src/lib/dkdm_recipient.cc b/src/lib/dkdm_recipient.cc index 4ab532f3d..bd14aedea 100644 --- a/src/lib/dkdm_recipient.cc +++ b/src/lib/dkdm_recipient.cc @@ -41,7 +41,7 @@ kdm_for_dkdm_recipient ( dcp::LocalTime valid_to ) { - if (!recipient.recipient) { + if (!recipient.recipient()) { return {}; } @@ -51,7 +51,7 @@ kdm_for_dkdm_recipient ( } auto const decrypted_kdm = film->make_kdm(cpl, valid_from, valid_to); - auto const kdm = decrypted_kdm.encrypt(signer, recipient.recipient.get(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0); + auto const kdm = decrypted_kdm.encrypt(signer, recipient.recipient().get(), {}, dcp::Formulation::MODIFIED_TRANSITIONAL_1, true, 0); dcp::NameFormat::Map name_values; name_values['f'] = kdm.content_title_text(); -- cgit v1.2.3