style: move with_tls_versions
to top
This commit is contained in:
parent
148708ee68
commit
e14efd6091
1 changed files with 10 additions and 10 deletions
|
@ -86,6 +86,16 @@ impl ClientBuilder {
|
||||||
Client::from(tls_config)
|
Client::from(tls_config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Limit the supported TLS versions list to the specified ones.
|
||||||
|
/// Default is [`rustls::DEFAULT_VERSIONS`].
|
||||||
|
pub fn with_tls_versions(
|
||||||
|
mut self,
|
||||||
|
versions: &'static [&'static SupportedProtocolVersion],
|
||||||
|
) -> Self {
|
||||||
|
self.tls_versions = Some(versions);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Include webpki trust anchors.
|
/// Include webpki trust anchors.
|
||||||
/// Not recommended (useless) as most Gemini capsules use self-signed
|
/// Not recommended (useless) as most Gemini capsules use self-signed
|
||||||
/// TLS certs and properly configured TOFU policy is enough.
|
/// TLS certs and properly configured TOFU policy is enough.
|
||||||
|
@ -128,14 +138,4 @@ impl ClientBuilder {
|
||||||
self.custom_verifier = Some(Arc::new(custom_verifier));
|
self.custom_verifier = Some(Arc::new(custom_verifier));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Limit the supported TLS versions list to the specified ones.
|
|
||||||
/// Default is [`rustls::DEFAULT_VERSIONS`].
|
|
||||||
pub fn with_tls_versions(
|
|
||||||
mut self,
|
|
||||||
versions: &'static [&'static SupportedProtocolVersion],
|
|
||||||
) -> Self {
|
|
||||||
self.tls_versions = Some(versions);
|
|
||||||
self
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue