diff --git a/src/client/http.rs b/src/client/http.rs index 40bbff3f..6bcb36d6 100644 --- a/src/client/http.rs +++ b/src/client/http.rs @@ -129,19 +129,29 @@ struct Config { impl_debug!( Config, { - accepts, headers, headers_order, + accepts, + connect_timeout, + connection_verbose, + pool_idle_timeout, + pool_max_idle_per_host, + pool_max_size, + tcp_keepalive, proxies, + auto_sys_proxy, redirect_policy, - accepts, + redirect_with_proxy_auth, referer, timeout, - connect_timeout, - https_only, - nodelay, + read_timeout, network_scheme, + nodelay, + hickory_dns, dns_overrides, + https_only, + http2_max_retry_count, + tls_info, builder, tls_config } diff --git a/src/tls/cert/store.rs b/src/tls/cert/store.rs index 3c6dfc9b..84c176aa 100644 --- a/src/tls/cert/store.rs +++ b/src/tls/cert/store.rs @@ -255,6 +255,16 @@ impl RootCertStoreProvider { } } +impl std::fmt::Debug for RootCertStoreProvider { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + RootCertStoreProvider::Owned(_) => f.debug_tuple("Owned").finish(), + RootCertStoreProvider::Borrowed(_) => f.debug_tuple("Borrowed").finish(), + RootCertStoreProvider::Default => f.debug_tuple("Default").finish(), + } + } +} + macro_rules! impl_root_cert_store { ($($type:ty => $variant:ident),* $(,)?) => { $( diff --git a/src/tls/conf.rs b/src/tls/conf.rs index 5bfb37ff..2e401cd7 100644 --- a/src/tls/conf.rs +++ b/src/tls/conf.rs @@ -1,5 +1,4 @@ use super::{AlpnProtos, AlpsProtos, RootCertStoreProvider, TlsVersion}; -use crate::impl_debug; use boring2::ssl::{CertCompressionAlgorithm, SslCurve}; use std::borrow::Cow; use typed_builder::TypedBuilder; @@ -8,7 +7,7 @@ use typed_builder::TypedBuilder; /// /// This struct defines various parameters to fine-tune the behavior of a TLS connection, /// including the root certificate store, certificate verification, ALPN protocols, and more. -#[derive(TypedBuilder)] +#[derive(Debug, TypedBuilder)] pub struct TlsConfig { /// The root certificate store. /// Default use system's native certificate store. @@ -194,36 +193,6 @@ impl Default for TlsConfig { } } -impl_debug!( - TlsConfig, - { - certs_verification, - tls_sni, - verify_hostname, - alpn_protos, - session_ticket, - min_tls_version, - max_tls_version, - alps_protos, - psk_dhe_ke, - pre_shared_key, - enable_ech_grease, - permute_extensions, - grease_enabled, - enable_ocsp_stapling, - renegotiation, - curves, - sigalgs_list, - cipher_list, - enable_signed_cert_timestamps, - cert_compression_algorithm, - record_size_limit, - key_shares_limit, - psk_skip_session_ticket, - extension_permutation_indices - } -); - /// A trait for converting various types into an optional `Cow` containing a slice of `CertCompressionAlgorithm`. /// /// This trait is used to provide a unified way to convert different types