summaryrefslogtreecommitdiff
path: root/src/decrypted_kdm.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-23 01:05:49 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-23 01:05:49 +0100
commit64e72c622be986c7272e938c2d3235c61abef402 (patch)
tree6cece3eee55fd26a79b2aa3c7e618f55258bcefc /src/decrypted_kdm.cc
parent2b5af718d2a1f5da548303c8531afe86fa82d2d8 (diff)
Add struct tm constructor for LocalTime, use it to tidy up
day_{greater,less}_than_or_equal and add add_months() method.
Diffstat (limited to 'src/decrypted_kdm.cc')
-rw-r--r--src/decrypted_kdm.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc
index 9468aabc..1f68c283 100644
--- a/src/decrypted_kdm.cc
+++ b/src/decrypted_kdm.cc
@@ -313,9 +313,9 @@ DecryptedKDM::encrypt (
DCP_ASSERT (!_keys.empty ());
BOOST_FOREACH (dcp::Certificate i, signer->leaf_to_root()) {
- if (day_greater_than_or_equal(i.not_before(), _not_valid_before)) {
+ if (day_greater_than_or_equal(dcp::LocalTime(i.not_before()), _not_valid_before)) {
throw BadKDMDateError (true);
- } else if (day_less_than_or_equal(i.not_after(), _not_valid_after)) {
+ } else if (day_less_than_or_equal(dcp::LocalTime(i.not_after()), _not_valid_after)) {
throw BadKDMDateError (false);
}
}