diff --git a/acme_common/src/crypto/openssl_certificate.rs b/acme_common/src/crypto/openssl_certificate.rs index 3a74164..87a760d 100644 --- a/acme_common/src/crypto/openssl_certificate.rs +++ b/acme_common/src/crypto/openssl_certificate.rs @@ -69,7 +69,10 @@ impl X509Certificate { pub fn expires_in(&self) -> Result { let raw_crt = self.inner_cert.to_der()?; let (_, crt) = parse_x509_der(&raw_crt).map_err(|_| Error::from("Invalid certificate."))?; - crt.tbs_certificate.validity.time_to_expiration().ok_or(Error::from("Invalid certificate validity.")) + crt.tbs_certificate + .validity + .time_to_expiration() + .ok_or(Error::from("Invalid certificate validity.")) } pub fn subject_alt_names(&self) -> HashSet { diff --git a/acme_common/src/crypto/openssl_keys.rs b/acme_common/src/crypto/openssl_keys.rs index 535baee..2c066ac 100644 --- a/acme_common/src/crypto/openssl_keys.rs +++ b/acme_common/src/crypto/openssl_keys.rs @@ -2,7 +2,7 @@ use crate::b64_encode; use crate::crypto::KeyType; use crate::error::Error; use openssl::bn::{BigNum, BigNumContext}; -use openssl::ec::{EcGroup, EcKey, Asn1Flag}; +use openssl::ec::{Asn1Flag, EcGroup, EcKey}; use openssl::ecdsa::EcdsaSig; use openssl::nid::Nid; use openssl::pkey::{Id, PKey, Private};