Skip to content

Commit b0cfb44

Browse files
committed
add aws-lc-rs-fips feature, adjust sys dep
Previously we unconditionally used the `aws-lc-sys` and `prebuilt-nasm` features of the `aws-lc-rs` dep, meaning we always brought along `aws-lc-sys` (note the `prebuilt-nasm` feature customizes that dep). However, when a user is looking for a FIPS crypto provider we want to avoid bringing in `aws-lc-sys` and instead use `aws-lc-rs/fips` to get `aws-lc-fips-sys`. This commit makes the `aws-lc-rs` feature of `webpki` activate the "usual" config: `aws-lc-rs/aws-lc-sys` w/ `aws-lc-rs/prebuilt-nasm` to have `aws-lc-sys` with prebuilt assmebly to avoid the nasm dep. A new `aws-lc-rs-fips` feature is added for `webpki` that activates the FIPS specific config: `aws-lc-rs/fips`. The `aws-lc-sys` and `prebuilt-nasm` features are **not** activated.
1 parent 3fc1d5e commit b0cfb44

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,4 +357,8 @@ jobs:
357357
uses: taiki-e/install-action@cargo-hack
358358

359359
- name: Check feature powerset
360-
run: cargo hack check --feature-powerset --no-dev-deps
360+
run: >
361+
cargo hack check
362+
--feature-powerset
363+
--no-dev-deps
364+
--mutually-exclusive-features aws-lc-rs,aws-lc-rs-fips

Cargo.lock

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,13 @@ name = "webpki"
7575
[features]
7676
default = ["std", "ring"]
7777
alloc = ["ring?/alloc", "pki-types/alloc"]
78-
aws-lc-rs = ["dep:aws-lc-rs"]
78+
aws-lc-rs = ["dep:aws-lc-rs", "aws-lc-rs/aws-lc-sys", "aws-lc-rs/prebuilt-nasm"]
79+
aws-lc-rs-fips = ["dep:aws-lc-rs", "aws-lc-rs/fips"]
7980
ring = ["dep:ring"]
8081
std = ["alloc", "pki-types/std"]
8182

8283
[dependencies]
83-
aws-lc-rs = { version = "1.9", optional = true, default-features = false, features = ["aws-lc-sys", "prebuilt-nasm"] }
84+
aws-lc-rs = { version = "1.9", optional = true, default-features = false }
8485
pki-types = { package = "rustls-pki-types", version = "1.7", default-features = false }
8586
ring = { version = "0.17", default-features = false, optional = true }
8687
untrusted = "0.9"

0 commit comments

Comments
 (0)