diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-19 21:34:56 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-20 07:31:44 +0100 |
| commit | 16557827b252bd653b15eead479ec5699eda7360 (patch) | |
| tree | f94f6822143802f2676c44e711984029eb3fb6cc /src/lib/kdm_cli.cc | |
| parent | 9d1d75e474bc92d8b0f823141073ad9dd639c8e0 (diff) | |
Add a dialog to show which screens have potentially-problematic
certificate validity periods when making KDMs (#2645).
Diffstat (limited to 'src/lib/kdm_cli.cc')
| -rw-r--r-- | src/lib/kdm_cli.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/kdm_cli.cc b/src/lib/kdm_cli.cc index 5ea808967..ddc77e771 100644 --- a/src/lib/kdm_cli.cc +++ b/src/lib/kdm_cli.cc @@ -257,13 +257,21 @@ from_film ( } - if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OUTSIDE_CERTIFICATE) != period_checks.end()) { + if (find_if( + period_checks.begin(), + period_checks.end(), + [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OUTSIDE_CERTIFICATE; } + ) != period_checks.end()) { throw KDMCLIError( "Some KDMs would have validity periods which are completely outside the recipient certificate periods. Such KDMs are very unlikely to work, so will not be created." ); } - if (find(period_checks.begin(), period_checks.end(), KDMCertificatePeriod::KDM_OVERLAPS_CERTIFICATE) != period_checks.end()) { + if (find_if( + period_checks.begin(), + period_checks.end(), + [](KDMCertificatePeriod const& p) { return p.overlap == KDMCertificateOverlap::KDM_OVERLAPS_CERTIFICATE; } + ) != period_checks.end()) { out("For some of these KDMs the recipient certificate's validity period will not cover the whole of the KDM validity period. This might cause problems with the KDMs."); } |
