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
//! User-facing TLS configuration.
//!
//! Consumers construct a [`Tls`] and pass it to a runtime-specific connector
//! (e.g. [`StreamStd::connect_tls`] / [`StreamStd::upgrade_tls`]); the
//! underlying TLS backend types (`rustls`, `native-tls`) never escape this
//! crate.
//!
//! ALPN lives on [`Rustls`] rather than [`Tls`] because `native-tls` does
//! not expose an ALPN option. Protocol crates (`io-imap`, `io-smtp`, ...)
//! ship `default_alpn()` helpers so config layers can populate
//! `rustls.alpn` before calling `connect_tls`.
//!
//! [`StreamStd::connect_tls`]: crate::std::stream::StreamStd::connect_tls
//! [`StreamStd::upgrade_tls`]: crate::std::stream::StreamStd::upgrade_tls
use PathBuf;
/// TLS settings shared by both backends.
/// TLS backend selector.
/// Rustls-specific TLS options.
/// Rustls crypto provider selector.