Browse Source

Format code

pull/19/head
Rodolphe Breard 5 years ago
parent
commit
996ea85be4
  1. 5
      acme_common/src/crypto/openssl_certificate.rs
  2. 2
      acme_common/src/crypto/openssl_keys.rs

5
acme_common/src/crypto/openssl_certificate.rs

@ -69,7 +69,10 @@ impl X509Certificate {
pub fn expires_in(&self) -> Result<Duration, Error> {
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<String> {

2
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};

Loading…
Cancel
Save