diff --git a/src/client/builder.rs b/src/client/builder.rs index 9e1f144..bb5e3db 100644 --- a/src/client/builder.rs +++ b/src/client/builder.rs @@ -86,6 +86,16 @@ impl ClientBuilder { 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. /// Not recommended (useless) as most Gemini capsules use self-signed /// TLS certs and properly configured TOFU policy is enough. @@ -128,14 +138,4 @@ impl ClientBuilder { self.custom_verifier = Some(Arc::new(custom_verifier)); 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 - } }