From 996ea85be4d1163893be84c8a0ccafbebb03645a Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Wed, 11 Mar 2020 17:11:53 +0100 Subject: [PATCH] Format code --- acme_common/src/crypto/openssl_certificate.rs | 5 ++++- acme_common/src/crypto/openssl_keys.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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};