From: Carl Hetherington Date: Fri, 22 Mar 2024 18:57:04 +0000 (+0100) Subject: Rename --certificate to --projector-certificate in KDM CLI. X-Git-Tag: v2.17.16~30 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=4ac1d022056cb69a6fadb9c41a625787961029c2 Rename --certificate to --projector-certificate in KDM CLI. --- diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index e4fabe1a6..c5a431289 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -73,8 +73,8 @@ help (std::function out) out (" -v, --verbose be verbose"); out (" -c, --cinema cinema name (when using -C) or name/email (to filter cinemas)"); out (" -S, --screen screen name (when using -C) or screen name (to filter screens when using -c)"); - out (" -C, --certificate file containing projector certificate"); out (" -T, --trusted-device file containing a trusted device's certificate"); + out (" -C, --projector-certificate file containing projector certificate"); out (" --cinemas-file use the given file as a list of cinemas instead of the current configuration"); out (" --list-cinemas list known cinemas from the DCP-o-matic settings"); out (" --list-dkdm-cpls list CPLs for which DCP-o-matic has DKDMs"); @@ -448,7 +448,7 @@ try auto filename_format = Config::instance()->kdm_filename_format(); optional cinema_name; shared_ptr cinema; - optional certificate; + optional projector_certificate; optional screen; vector> screens; optional dkdm; @@ -488,8 +488,8 @@ try { "verbose", no_argument, 0, 'v' }, { "cinema", required_argument, 0, 'c' }, { "screen", required_argument, 0, 'S' }, - { "certificate", required_argument, 0, 'C' }, { "trusted-device", required_argument, 0, 'T' }, + { "projector-certificate", required_argument, 0, 'C' }, { "list-cinemas", no_argument, 0, 'B' }, { "list-dkdm-cpls", no_argument, 0, 'D' }, { "cinemas-file", required_argument, 0, 'E' }, @@ -572,7 +572,7 @@ try screen = optarg; break; case 'C': - certificate = optarg; + projector_certificate = optarg; break; case 'T': /* A trusted device ends up in the last screen we made */ @@ -596,9 +596,9 @@ try Config::instance()->set_cinemas_file(*cinemas_file); } - if (certificate) { + if (projector_certificate) { /* Make a new screen and add it to the current cinema */ - dcp::CertificateChain chain(dcp::file_to_string(*certificate)); + dcp::CertificateChain chain(dcp::file_to_string(*projector_certificate)); auto screen_to_add = std::make_shared(screen.get_value_or(""), "", chain.leaf(), boost::none, vector()); if (cinema) { cinema->add_screen(screen_to_add); diff --git a/test/kdm_cli_test.cc b/test/kdm_cli_test.cc index 2e5e4760c..720cdc01f 100644 --- a/test/kdm_cli_test.cc +++ b/test/kdm_cli_test.cc @@ -62,7 +62,7 @@ BOOST_AUTO_TEST_CASE (kdm_cli_test_certificate) "--verbose", "--valid-from", "now", "--valid-duration", "2 weeks", - "--certificate", "test/data/cert.pem", + "--projector-certificate", "test/data/cert.pem", "-S", "my great screen", "-o", "build/test", "test/data/dkdm.xml"