Skip to content

Commit 16d7e59

Browse files
authored
Add feature flag for enabling FIPS. (#268)
1 parent 0d38794 commit 16d7e59

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,17 @@ jobs:
7272
RUST_BACKTRACE: 1
7373

7474
- name: cargo test (debug; all features)
75+
if: runner.os == 'Linux'
7576
run: cargo test --all-features
7677
env:
7778
RUST_BACKTRACE: 1
7879

80+
- name: cargo test (debug; all features, excluding FIPS)
81+
if: runner.os != 'Linux'
82+
run: cargo test --features aws-lc-rs,http1,http2,webpki-tokio,native-tokio,ring,tls12,logging
83+
env:
84+
RUST_BACKTRACE: 1
85+
7986
- name: cargo build (debug; no default features)
8087
run: cargo build --no-default-features
8188

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ native-tokio = ["rustls-native-certs"]
4242
ring = ["rustls/ring"]
4343
tls12 = ["tokio-rustls/tls12", "rustls/tls12"]
4444
logging = ["log", "tokio-rustls/logging", "rustls/logging"]
45+
fips = ["aws-lc-rs", "rustls/fips"]
4546

4647
[[example]]
4748
name = "client"

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,28 @@ cargo run --example server
3535
```bash
3636
cargo run --example client "https://docs.rs/hyper-rustls/latest/hyper_rustls/"
3737
```
38+
39+
## Crate features
40+
41+
This crate exposes a number of features to add support for different portions of `hyper-util`,
42+
`rustls`, and other dependencies.
43+
44+
| Feature flag | Enabled by default | Description |
45+
| ------------ | ------------------ | ----------- |
46+
| `aws-lc-rs` | **yes** | Enables use of the [AWS-LC][aws-lc-rs] backend for [`rustls`][rustls] |
47+
| `http1` | **yes** | Enables HTTP/1 support in [`hyper-util`][hyper-util] |
48+
| `http2` | **no** | Enables HTTP/2 support in [`hyper-util`][hyper-util] |
49+
| `webpki-tokio` | **no** | Uses a compiled-in set of root certificates trusted by Mozilla (via [`webpki-roots`][webpki-roots]) |
50+
| `native-tokio` | **yes** | Use the platform's native certificate store at runtime (via [`rustls-native-certs`][rustls-native-certs]) |
51+
| `ring` | **no** | Enables use of the [`ring`][ring] backend for [`rustls`][rustls] |
52+
| `tls12` | **yes** | Enables support for TLS 1.2 (only TLS 1.3 supported when disabled) |
53+
| `logging` | **yes** | Enables logging of protocol-level diagnostics and errors via [`log`][log] |
54+
| `fips` | **no** | Enables support for using a FIPS 140-3 compliant backend via AWS-LC (enables `aws-lc-rs` feature) |
55+
56+
[aws-lc-rs]: https://docs.rs/aws-lc-rs
57+
[rustls]: https://docs.rs/rustls
58+
[hyper-util]: https://docs.rs/hyper-util
59+
[webpki-roots]: https://docs.rs/webpki-roots
60+
[rustls-native-certs]: https://docs.rs/rustls-native-certs
61+
[ring]: https://docs.rs/ring
62+
[log]: https://docs.rs/log

0 commit comments

Comments
 (0)