Rename nwe to mozilla_intermediate
This commit is contained in:
parent
43b430e5b0
commit
7d13176cd1
|
|
@ -103,11 +103,11 @@ impl ServerConnectorBuilder {
|
|||
///
|
||||
/// The default configuration is based off of the intermediate profile of Mozilla's server side
|
||||
/// TLS configuration recommendations, and is subject to change.
|
||||
pub fn new<I>(method: SslMethod,
|
||||
private_key: &PKeyRef,
|
||||
certificate: &X509Ref,
|
||||
chain: I)
|
||||
-> Result<ServerConnectorBuilder, ErrorStack>
|
||||
pub fn mozilla_intermediate<I>(method: SslMethod,
|
||||
private_key: &PKeyRef,
|
||||
certificate: &X509Ref,
|
||||
chain: I)
|
||||
-> Result<ServerConnectorBuilder, ErrorStack>
|
||||
where I: IntoIterator,
|
||||
I::Item: AsRef<X509Ref>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,10 +43,8 @@
|
|||
//! let pkcs12 = Pkcs12::from_der(&pkcs12).unwrap();
|
||||
//! let identity = pkcs12.parse("password123").unwrap();
|
||||
//!
|
||||
//! let connector = ServerConnectorBuilder::new(SslMethod::tls(),
|
||||
//! &identity.pkey,
|
||||
//! &identity.cert,
|
||||
//! &identity.chain)
|
||||
//! let connector = ServerConnectorBuilder::mozilla_intermediate(
|
||||
//! SslMethod::tls(), &identity.pkey, &identity.cert, &identity.chain)
|
||||
//! .unwrap()
|
||||
//! .build();
|
||||
//! let connector = Arc::new(connector);
|
||||
|
|
|
|||
|
|
@ -1112,7 +1112,8 @@ fn connector_client_server() {
|
|||
let t = thread::spawn(move || {
|
||||
let key = PKey::private_key_from_pem(KEY).unwrap();
|
||||
let cert = X509::from_pem(CERT).unwrap();
|
||||
let connector = ServerConnectorBuilder::new(SslMethod::tls(), &key, &cert, None::<X509>)
|
||||
let connector = ServerConnectorBuilder::mozilla_intermediate(
|
||||
SslMethod::tls(), &key, &cert, None::<X509>)
|
||||
.unwrap()
|
||||
.build();
|
||||
let stream = listener.accept().unwrap().0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue