From 81b15e9e131094879b416b26601c673e6ae0d508 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Apr 2026 22:39:24 +0200 Subject: Add --trusted-device-chain option to KDM CLI. --- src/lib/kdm_cli.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index 1b625e50c..bd400b458 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -96,6 +96,7 @@ help(std::function out) out(" -S, --screen screen name (when using -C) or screen name (to filter screens when using -c)"); out(" -C, --projector-certificate file containing projector certificate"); out(" -T, --trusted-device-certificate file containing a trusted device's certificate"); + out(" --trusted-device-chain file containing a trusted device's chain; the leaf certificate will be used"); out(" --decryption-key file containing the private key which can decrypt the given DKDM"); out(variant::insert_dcpomatic(" ({}'s configured private key will be used otherwise)")); out(" --cinemas-file use the given file as a list of cinemas instead of the current configuration"); @@ -525,12 +526,13 @@ try { "screen", required_argument, 0, 'S' }, { "projector-certificate", required_argument, 0, 'C' }, { "trusted-device-certificate", required_argument, 0, 'T' }, + { "trusted-device-chain", required_argument, 0, 'H' }, { "decryption-key", required_argument, 0, 'G' }, { "cinemas-file", required_argument, 0, 'E' }, { 0, 0, 0, 0 } }; - int c = getopt_long(argc, argv, "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:E:G", long_options, &option_index); + int c = getopt_long(argc, argv, "ho:K:Z:f:t:d:F:pae::zvc:S:C:T:E:G:H", long_options, &option_index); if (c == -1) { break; @@ -603,6 +605,12 @@ try case 'T': trusted_devices.push_back(TrustedDevice(dcp::Certificate(dcp::file_to_string(optarg)))); break; + case 'H': + { + auto chain = dcp::CertificateChain(dcp::file_to_string(optarg)); + trusted_devices.push_back(TrustedDevice(chain.leaf())); + break; + } case 'G': decryption_key = optarg; break; -- cgit v1.2.3