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
//! The TLS setup, in one place for every transport that needs rustls (HTTPS, and with `ws` the
//! WebSocket).
//!
//! ring is the only crypto provider. It is ALWAYS handed to rustls explicitly: never
//! `CryptoProvider::install_default()` (process-wide: it would change other crates' TLS) and never a
//! path that falls back to the process default (rustls panics there when an app also links another
//! provider, e.g. aws-lc-rs).
use Arc;
use CryptoProvider;
/// The provider every TLS connection of this crate uses: ring's.
pub
/// A fresh rustls client config: ring, TLS 1.2 + 1.3, Mozilla's root certificates (webpki-roots),
/// no ALPN (hyper-rustls sets its own; the WebSocket needs none).
pub
/// Bytes from the operating system's secure random source (through ring; no extra dependency).
pub