1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
use *;
/// Constructs a rustls [`ClientConfig`] with session resumption and protocol ALPN.
///
/// # Arguments
///
/// - `RootCertStore` - Trust anchor root certificate store.
/// - `bool` - Whether to advertise `h2` ALPN ahead of `http/1.1`.
///
/// # Returns
///
/// - `Arc<ClientConfig>` - Ready shared client TLS configuration.
/// Computes a deterministic 64-bit fingerprint for TLS trust stores (`0` for default WebPKI roots).
///
/// # Arguments
///
/// - `Option<&RootCertStore>` - Optional custom TLS trust anchor store (`None` means bundled Mozilla roots).
///
/// # Returns
///
/// - `u64` - `0` for bundled default roots, or a non-zero FNV-1a digest over all custom trust anchors.
pub
/// Returns a cached default TLS config or caches/constructs one for a custom root certificate store.
///
/// # Arguments
///
/// - `Option<&RootCertStore>` - Optional custom root certificate store (`None` uses bundled Mozilla roots).
/// - `bool` - Whether HTTP/2 ALPN should be advertised.
///
/// # Returns
///
/// - `Arc<ClientConfig>` - Shared rustls client configuration.
pub
/// Parses one or more PEM-encoded X.509 certificates and inserts them into `roots`.
///
/// # Arguments
///
/// - `&mut RootCertStore` - Target root certificate store.
/// - `&[u8]` - Raw PEM-encoded certificate bytes.
///
/// # Returns
///
/// - `Result<usize, RequestError>` - Number of certificates added, or an error when none are valid.
pub