@@ -13,5 +13,39 @@ It can be used to easily create a `Stream` of TLS connections from a listening s
13
13
14
14
See examples for examples of usage.
15
15
16
- You must enable either one of the ` rustls ` , ` native-tls ` , or ` openssl ` features depending on which implementation you
17
- would like to use.
16
+ You must enable either one of the ` rustls[-xyz] ` (more details below), ` native-tls ` , or ` openssl `
17
+ features depending on which implementation you would like to use.
18
+
19
+ When enabling the ` rustls ` feature, the ` rustls ` crate will be added as a dependency through
20
+ the ` tokio-rustls ` crate without any
21
+ [ cryptography providers] ( https://docs.rs/rustls/latest/rustls/#cryptography-providers )
22
+ included by default. To include one, do either of the following:
23
+
24
+ 1 . Enable at least one of the additional ` rustls-aws-lc ` , ` rustls-fips ` , or ` rustls-ring ` features.
25
+ By doing this, you can also remove the ` rustls ` feature flag since it will be enabled
26
+ automatically by any of the ` rustls-xyz ` features.
27
+
28
+ ``` toml
29
+ # Replace `rustls-xyz` with one of the features mentioned above.
30
+ tls-listener = { version = " x" , features = [" rustls-xyz" ] }
31
+ ```
32
+
33
+ These features will enable their relevant [ ` rustls ` features] ( https://docs.rs/rustls/latest/rustls/#crate-features ) .
34
+
35
+ 1 . Keep the ` rustls ` feature flag, but directly add the [ ` rustls ` ] ( https://crates.io/crates/rustls )
36
+ and/or [ ` tokio-rustls ` ] ( https://crates.io/crates/tokio-rustls ) crates to your project's
37
+ dependencies and enable your preferred flags on them instead of adding additional flags on
38
+ this crate (` tls-listener ` ).
39
+
40
+ ``` toml
41
+ # Replace `xyz` with one of the features mentioned in the crate's documentation.
42
+ # for example: `aws-lc-rc`, `fips` or `ring`
43
+ rustls = { version = " x" , default-features = false , features = [" xyz" ]}
44
+ # And/or
45
+ tokio-rustls = { version = " x" , default-features = false , features = [" xyz" ]}
46
+ ```
47
+
48
+ You can also enable the default features by removing ` default-features = false ` , which will
49
+ enable the [ AWS-LC crypto provider] ( https://github.com/aws/aws-lc-rs ) . However, their
50
+ default features are not enable by ` tls-listener ` because doing so will make disabling
51
+ them very hard for dependent crates.
0 commit comments