Skip to content

Commit

Permalink
chore(deps): update to latest version of chrono
Browse files Browse the repository at this point in the history
Update to latest version of chrono, fix deprecation warnings.

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
  • Loading branch information
flavio committed Aug 30, 2023
1 parent 3aa96e8 commit 658ebfb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ async-trait = "0.1.52"
base64 = "0.21.0"
cached = { version = "0.44.0", optional = true }
cfg-if = "1.0.0"
chrono = { version = "0.4.23", default-features = false }
chrono = { version = "0.4.27", default-features = false }
const-oid = "0.9.1"
digest = { version = "0.10.3", default-features = false }
ecdsa = { version = "0.16.7", features = ["pkcs8", "digest", "der", "signing"] }
Expand Down Expand Up @@ -123,7 +123,7 @@ zeroize = "1.5.7"
[dev-dependencies]
anyhow = { version = "1.0", features = ["backtrace"] }
assert-json-diff = "2.0.2"
chrono = "0.4.20"
chrono = "0.4.27"
clap = { version = "4.0.8", features = ["derive"] }
docker_credential = "1.1.0"
openssl = "0.10.38"
Expand Down
2 changes: 1 addition & 1 deletion src/cosign/verification_constraint/certificate_verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl VerificationConstraint for CertificateVerifier {
}
match &signature_layer.bundle {
Some(bundle) => {
let it = DateTime::<Utc>::from_utc(
let it = DateTime::<Utc>::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(bundle.payload.integrated_time, 0).ok_or(
SigstoreError::UnexpectedError("timestamp is not legal".into()),
)?,
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ pub(crate) fn verify_validity(certificate: &Certificate) -> Result<()> {
}

fn verify_expiration(certificate: &Certificate, integrated_time: i64) -> Result<()> {
let it = DateTime::<Utc>::from_utc(
let it = DateTime::<Utc>::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(integrated_time, 0)
.ok_or(SigstoreError::X509Error("timestamp is not legal".into()))?,
Utc,
Expand Down

0 comments on commit 658ebfb

Please sign in to comment.