- list<pair<string, string> > key_ids;
- list<string> keys;
- BOOST_FOREACH (DecryptedKDMKey const & i, _keys) {
+ DCP_ASSERT (!_keys.empty ());
+
+ for (auto i: signer->leaf_to_root()) {
+ if (day_greater_than_or_equal(dcp::LocalTime(i.not_before()), _not_valid_before)) {
+ throw BadKDMDateError (true);
+ } else if (day_less_than_or_equal(dcp::LocalTime(i.not_after()), _not_valid_after)) {
+ throw BadKDMDateError (false);
+ }
+ }
+
+ vector<pair<string, string>> key_ids;
+ vector<string> keys;
+ for (auto const& i: _keys) {