c2pa-rs

A fork of https://github.com/contentauth/c2pa-rs/
git clone git://archive.git.mtrnord.blog/mtrnords-photography-manager/c2pa-rs.git
Log | Files | Refs | README

commit 1636281052b42410306cb19fd8710cfbe9e3a7a1
parent 7b96b8afceed320bb4f97309767a525c2100ee44
Author: Eric Scouten <scouten@adobe.com>
Date:   Wed,  6 Mar 2024 13:14:57 -0800

Fix use of deprecated method `chrono::NaiveDateTime::timestamp` (#417)

Use `.and_utc().timestamp()` instead.
Diffstat:
Msdk/src/ocsp_utils.rs | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/sdk/src/ocsp_utils.rs b/sdk/src/ocsp_utils.rs @@ -236,11 +236,13 @@ pub(crate) fn check_ocsp_response( DATE_FMT, ) .map_err(|_e| Error::CoseInvalidCert)? + .and_utc() .timestamp(); let next_update = if let Some(nu) = &single_response.next_update { NaiveDateTime::parse_from_str(&nu.to_string(), DATE_FMT) .map_err(|_e| Error::CoseInvalidCert)? + .and_utc() .timestamp() } else { this_update @@ -295,6 +297,7 @@ pub(crate) fn check_ocsp_response( DATE_FMT, ) .map_err(|_e| Error::CoseInvalidCert)? + .and_utc() .timestamp(); // check to see if we are within range or current time within range