Make 'tls' its own module.

This commit is contained in:
Sergio Benitez 2021-07-04 15:01:55 -07:00
parent efce2bc958
commit de4b3e3891
4 changed files with 7 additions and 6 deletions

View File

@ -42,15 +42,16 @@ pub mod uncased {
#[doc(hidden)]
#[path = "."]
pub mod private {
#[cfg(feature = "tls")]
pub mod tls;
pub use crate::parse::Indexed;
pub use smallvec::{SmallVec, Array};
pub use crate::listener::{Incoming, Listener, Connection, bind_tcp};
pub use cookie;
}
#[doc(hidden)]
#[cfg(feature = "tls")]
pub mod tls;
pub use crate::method::Method;
pub use crate::status::{Status, StatusClass};
pub use crate::raw_str::{RawStr, RawStrBuf};

View File

@ -382,8 +382,8 @@ impl TlsConfig {
#[cfg(feature = "tls")]
mod with_tls_feature {
use crate::http::private::tls::rustls::SupportedCipherSuite as RustlsCipher;
use crate::http::private::tls::rustls::ciphersuite as rustls;
use crate::http::tls::rustls::SupportedCipherSuite as RustlsCipher;
use crate::http::tls::rustls::ciphersuite as rustls;
use super::*;

View File

@ -367,7 +367,7 @@ impl Rocket<Orbit> {
#[cfg(feature = "tls")]
if let Some(ref config) = self.config.tls {
use crate::http::private::tls::bind_tls;
use crate::http::tls::bind_tls;
let (certs, key) = config.to_readers().map_err(ErrorKind::Io)?;
let ciphers = config.rustls_ciphers();