diff options
author | Alex Auvolat <alex@adnab.me> | 2021-12-09 12:18:23 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-12-09 12:18:23 +0100 |
commit | fdb83162ce9979184a9d680c5ec4f64235497485 (patch) | |
tree | 543d1d0b7c8f63d7a10c38d1d95c8b2e2c8a180f /src/tls_util.rs | |
parent | 8153bdca4618eed76665eeb4c5a005378701df1f (diff) | |
download | tricot-fdb83162ce9979184a9d680c5ec4f64235497485.tar.gz tricot-fdb83162ce9979184a9d680c5ec4f64235497485.zip |
Improved management of ACME orders and certificate pre-expiration period
Diffstat (limited to 'src/tls_util.rs')
-rw-r--r-- | src/tls_util.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/tls_util.rs b/src/tls_util.rs index 054c35a..91ad31c 100644 --- a/src/tls_util.rs +++ b/src/tls_util.rs @@ -1,21 +1,20 @@ use core::future::Future; use core::task::{Context, Poll}; use std::convert::TryFrom; +use std::io; use std::pin::Pin; use std::sync::Arc; -use std::io; use futures_util::future::*; -use rustls::ServerName; use hyper::client::connect::Connection; use hyper::client::HttpConnector; use hyper::service::Service; use hyper::Uri; use hyper_rustls::MaybeHttpsStream; +use rustls::ServerName; use tokio::io::{AsyncRead, AsyncWrite}; use tokio_rustls::TlsConnector; - #[derive(Clone)] pub struct HttpsConnectorFixedDnsname<T> { http: T, @@ -62,8 +61,7 @@ where let cfg = self.tls_config.clone(); let connecting_future = self.http.call(dst); - let dnsname = - ServerName::try_from(self.fixed_dnsname).expect("Invalid fixed dnsname"); + let dnsname = ServerName::try_from(self.fixed_dnsname).expect("Invalid fixed dnsname"); let f = async move { let tcp = connecting_future.await.map_err(Into::into)?; let connector = TlsConnector::from(cfg); @@ -76,4 +74,3 @@ where f.boxed() } } - |