diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6180342d446..4901d5035a0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -99,7 +99,7 @@ jobs:
RUST_BACKTRACE: 1
- name: cargo build (debug; no-std)
- run: cargo build --locked --lib -p rustls $(admin/all-features-except std,brotli,read_buf rustls)
+ run: cargo build --locked --lib -p shaped-rustls $(admin/all-features-except std,brotli,read_buf shaped-rustls)
- name: cargo build (debug; rustls-provider-example)
run: cargo build --locked -p rustls-provider-example
@@ -116,8 +116,8 @@ jobs:
- name: cargo test (debug; rustls-provider-test; all features)
run: cargo test --all-features -p rustls-provider-test
- - name: cargo package --all-features -p rustls
- run: cargo package --all-features -p rustls
+ - name: cargo package --all-features -p shaped-rustls
+ run: cargo package --all-features -p shaped-rustls
msrv:
name: MSRV
@@ -130,16 +130,16 @@ jobs:
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: "1.71"
+ toolchain: "1.85"
# zlib-rs is optional and requires a later MSRV
- - run: cargo check --locked --lib $(admin/all-features-except zlib rustls) -p rustls
+ - run: cargo check --locked --lib $(admin/all-features-except zlib shaped-rustls) -p shaped-rustls
- uses: dtolnay/rust-toolchain@master
with:
- toolchain: "1.75"
+ toolchain: "1.85"
- - run: cargo check --locked --lib --all-features -p rustls
+ - run: cargo check --locked --lib --all-features -p shaped-rustls
features:
name: Features
@@ -231,12 +231,6 @@ jobs:
env:
BOGO_SHIM_PROVIDER: aws-lc-rs-fips
- - name: Run test suite (post-quantum)
- working-directory: bogo
- run: ./runme
- env:
- BOGO_SHIM_PROVIDER: post-quantum
-
fuzz:
name: Smoke-test fuzzing targets
runs-on: ubuntu-latest
@@ -300,7 +294,7 @@ jobs:
uses: dtolnay/rust-toolchain@nightly
- name: cargo doc (rustls; all features)
- run: cargo doc --locked --all-features --no-deps --document-private-items --package rustls
+ run: cargo doc --locked --all-features --no-deps --document-private-items --package shaped-rustls
env:
RUSTDOCFLAGS: -Dwarnings
@@ -405,8 +399,8 @@ jobs:
tool: bindgen-cli
- name: Enable bindgen feature for aws-lc-sys (as needed for many cross targets)
if: ${{ matrix.target != 'i686-unknown-linux-gnu' }}
- run: cargo add --dev --features bindgen 'aws-lc-sys@>0.20' --package rustls --verbose
- - run: cross test --package rustls --target ${{ matrix.target }}
+ run: cargo add --dev --features bindgen 'aws-lc-sys@>0.20' --package shaped-rustls --verbose
+ - run: cross test --package shaped-rustls --target ${{ matrix.target }}
semver:
name: Check semver compatibility
@@ -417,7 +411,22 @@ jobs:
with:
persist-credentials: false
+ # The check compares the API with the latest release on crates.io. Before
+ # the first release there is nothing to compare with, and it can only fail.
+ - name: Look for a release to compare with
+ id: release
+ run: |
+ code=$(curl --silent --output /dev/null --write-out '%{http_code}' \
+ --user-agent 'shaped-rustls-ci (github.com/aimalygin/shaped-rustls)' \
+ https://crates.io/api/v1/crates/shaped-rustls)
+ case "$code" in
+ 200) echo "found=true" >> "$GITHUB_OUTPUT" ;;
+ 404) echo "shaped-rustls has no release on crates.io yet: nothing to compare with" ;;
+ *) echo "crates.io answered $code"; exit 1 ;;
+ esac
+
- name: Check semver
+ if: steps.release.outputs.found == 'true'
uses: obi1kenobi/cargo-semver-checks-action@v2
format:
@@ -480,26 +489,6 @@ jobs:
components: clippy
- run: ./admin/clippy -- --deny warnings
- clippy-nightly:
- name: Clippy (Nightly)
- runs-on: ubuntu-latest
- steps:
- - name: Checkout sources
- uses: actions/checkout@v4
- with:
- persist-credentials: false
-
- - name: Install valgrind
- if: runner.os == 'Linux'
- run: sudo apt-get update && sudo apt-get install -y valgrind
-
- - name: Install rust toolchain
- uses: dtolnay/rust-toolchain@nightly
- with:
- components: clippy
- # Do not deny warnings, as nightly clippy sometimes has false negatives.
- - run: ./admin/clippy
-
check-external-types:
name: Validate external types appearing in public API
runs-on: ubuntu-latest
@@ -511,7 +500,7 @@ jobs:
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
- toolchain: nightly-2025-10-18
+ toolchain: nightly-2026-03-20
# ^ sync with https://github.com/awslabs/cargo-check-external-types/blob/main/rust-toolchain.toml
- name: Install cargo-check-external-types
uses: taiki-e/cache-cargo-install-action@v3
@@ -521,23 +510,6 @@ jobs:
working-directory: rustls/
run: cargo check-external-types
- taplo:
- name: Taplo
- runs-on: ubuntu-latest
- steps:
- - name: Checkout sources
- uses: actions/checkout@v4
- with:
- persist-credentials: false
-
- - name: Install rust toolchain
- uses: dtolnay/rust-toolchain@stable
- - name: Install taplo-cli
- uses: taiki-e/cache-cargo-install-action@v3
- with:
- tool: taplo-cli
- - run: taplo format --check
-
openssl-tests:
name: Run openssl-tests
runs-on: ubuntu-latest
diff --git a/.github/workflows/cifuzz.yml b/.github/workflows/cifuzz.yml
index 8f5cc258208..23030668741 100644
--- a/.github/workflows/cifuzz.yml
+++ b/.github/workflows/cifuzz.yml
@@ -7,6 +7,8 @@ concurrency:
jobs:
Fuzzing:
+ # OSS-Fuzz knows the upstream project only.
+ if: github.repository == 'rustls/rustls'
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
diff --git a/.github/workflows/daily-tests.yml b/.github/workflows/daily-tests.yml
index f3b28127f2c..2a00a911548 100644
--- a/.github/workflows/daily-tests.yml
+++ b/.github/workflows/daily-tests.yml
@@ -149,7 +149,7 @@ jobs:
- name: Check feature powerset
run: >
cargo hack check
- --package rustls
+ --package shaped-rustls
--feature-powerset
--no-dev-deps
--group-features aws_lc_rs,aws-lc-rs
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index caef3cfdf3b..25160d397bf 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -39,7 +39,7 @@ jobs:
- name: cargo doc
# keep features in sync with Cargo.toml `[package.metadata.docs.rs]` section
- run: cargo doc --locked --features read_buf,ring --no-deps --package rustls
+ run: cargo doc --locked --features read_buf,ring --no-deps --package shaped-rustls
env:
RUSTDOCFLAGS: -Dwarnings --cfg=rustls_docsrs --html-after-content tag.html
diff --git a/.github/workflows/shaped.yml b/.github/workflows/shaped.yml
new file mode 100644
index 00000000000..27cef8d6aaf
--- /dev/null
+++ b/.github/workflows/shaped.yml
@@ -0,0 +1,43 @@
+name: shaped-rustls
+
+permissions:
+ contents: read
+
+on:
+ push:
+ branches: ['shaped/**', 'xray/**']
+ pull_request:
+ branches: ['shaped/**', 'xray/**']
+
+concurrency:
+ group: shaped-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ test:
+ name: Tests (${{ matrix.features }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ features:
+ - ring
+ - ring,brotli,zlib
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ - uses: dtolnay/rust-toolchain@stable
+ - name: Library, integration and doc tests
+ run: cargo test --locked -p shaped-rustls --features ${{ matrix.features }}
+
+ package:
+ name: Package
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ persist-credentials: false
+ - uses: dtolnay/rust-toolchain@stable
+ - name: Build the crate as crates.io would receive it
+ run: cargo package --locked -p shaped-rustls
diff --git a/Cargo.lock b/Cargo.lock
index cdd379a4617..2f4fbe5fb84 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -39,9 +39,9 @@ dependencies = [
[[package]]
name = "aho-corasick"
-version = "1.1.4"
+version = "1.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
dependencies = [
"memchr",
]
@@ -54,9 +54,9 @@ checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"
[[package]]
name = "alloc-stdlib"
-version = "0.2.2"
+version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece"
+checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195"
dependencies = [
"alloc-no-stdlib",
]
@@ -119,9 +119,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.102"
+version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
[[package]]
name = "asn1"
@@ -135,9 +135,9 @@ dependencies = [
[[package]]
name = "asn1-rs"
-version = "0.7.1"
+version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56624a96882bb8c26d61312ae18cb45868e5a9992ea73c58e45c3101e56a1e60"
+checksum = "b7f43a50ac4fdca5df8e885c21b835997f0a1cdee65494a6847694a98652d9d8"
dependencies = [
"asn1-rs-derive",
"asn1-rs-impl",
@@ -157,7 +157,7 @@ checksum = "3109e49b1e4909e9db6515a30c633684d68cdeaa252f215214cb4fa1a5bfee2c"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
"synstructure",
]
@@ -169,7 +169,7 @@ checksum = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -180,18 +180,18 @@ checksum = "cdccf849b54365e3693e9a90ad36e4482b79937e6373ac8e2cf229c985187b21"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "async-trait"
-version = "0.1.89"
+version = "0.1.92"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
+checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
@@ -202,29 +202,30 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
[[package]]
name = "autocfg"
-version = "1.5.0"
+version = "1.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
[[package]]
name = "aws-lc-fips-sys"
-version = "0.13.14"
+version = "0.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3d619165468401dec3caa3366ebffbcb83f2f31883e5b3932f8e2dec2ddc568"
+checksum = "118303cd75f63d1933a90c2ceb7e697281ac6acbdbcc490b46419f25a527ab90"
dependencies = [
"bindgen",
"cc",
"cmake",
"dunce",
"fs_extra",
+ "pkg-config",
"regex",
]
[[package]]
name = "aws-lc-rs"
-version = "1.16.3"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f"
+checksum = "ce2b2dcc879c3bae0d371e77c99f2238400ef24ec001394befa67b6e543add9e"
dependencies = [
"aws-lc-fips-sys",
"aws-lc-sys",
@@ -234,14 +235,15 @@ dependencies = [
[[package]]
name = "aws-lc-sys"
-version = "0.40.0"
+version = "0.44.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7"
+checksum = "f09fae7be8bb3174e05c6afdb34199e6dc0c7c04ba9fa237b1967adfbde27483"
dependencies = [
"cc",
"cmake",
"dunce",
"fs_extra",
+ "pkg-config",
]
[[package]]
@@ -256,6 +258,12 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
+[[package]]
+name = "base64"
+version = "0.23.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
+
[[package]]
name = "base64ct"
version = "1.8.3"
@@ -274,25 +282,40 @@ version = "0.72.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
dependencies = [
- "bitflags",
+ "bitflags 2.13.1",
"cexpr",
"clang-sys",
- "itertools 0.13.0",
+ "itertools 0.10.5",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
- "shlex",
- "syn",
+ "shlex 1.3.0",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "bit-vec"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"
+dependencies = [
+ "serde",
]
[[package]]
name = "bitflags"
-version = "2.11.1"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "bitflags"
+version = "2.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3"
+checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
[[package]]
name = "block-buffer"
@@ -307,19 +330,18 @@ dependencies = [
name = "bogo"
version = "0.1.0"
dependencies = [
- "base64",
+ "base64 0.22.1",
"env_logger",
"nix",
- "rustls",
- "rustls-post-quantum",
"rustls-webpki",
+ "shaped-rustls",
]
[[package]]
name = "brotli"
-version = "8.0.2"
+version = "8.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560"
+checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -328,9 +350,9 @@ dependencies = [
[[package]]
name = "brotli-decompressor"
-version = "5.0.0"
+version = "5.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03"
+checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583"
dependencies = [
"alloc-no-stdlib",
"alloc-stdlib",
@@ -338,9 +360,9 @@ dependencies = [
[[package]]
name = "bumpalo"
-version = "3.20.2"
+version = "3.20.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
[[package]]
name = "byteorder"
@@ -350,9 +372,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
[[package]]
name = "bytes"
-version = "1.11.1"
+version = "1.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]]
name = "cast"
@@ -362,14 +384,14 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.2.60"
+version = "1.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20"
+checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273"
dependencies = [
"find-msvc-tools",
"jobserver",
"libc",
- "shlex",
+ "shlex 2.0.1",
]
[[package]]
@@ -389,9 +411,9 @@ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "cfg_aliases"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
[[package]]
name = "chacha20"
@@ -404,6 +426,17 @@ dependencies = [
"cpufeatures 0.2.17",
]
+[[package]]
+name = "chacha20"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.1",
+ "rand_core 0.10.1",
+]
+
[[package]]
name = "chacha20poly1305"
version = "0.10.1"
@@ -411,7 +444,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
dependencies = [
"aead",
- "chacha20",
+ "chacha20 0.9.1",
"cipher",
"poly1305",
"zeroize",
@@ -457,9 +490,9 @@ dependencies = [
[[package]]
name = "clang-sys"
-version = "1.8.1"
+version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
+checksum = "157a8ba7b480713b56f4c09fd13fc3e0a22a5dfab8097ba61cbc5feef950788a"
dependencies = [
"glob",
"libc",
@@ -468,9 +501,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.6.1"
+version = "4.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
+checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"
dependencies = [
"clap_builder",
"clap_derive",
@@ -478,9 +511,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.6.0"
+version = "4.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
+checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"
dependencies = [
"anstream",
"anstyle",
@@ -490,14 +523,14 @@ dependencies = [
[[package]]
name = "clap_derive"
-version = "4.6.1"
+version = "4.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"
+checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"
dependencies = [
"heck",
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
@@ -521,12 +554,38 @@ version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
+[[package]]
+name = "combine"
+version = "4.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e"
+dependencies = [
+ "bytes",
+ "memchr",
+]
+
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
+[[package]]
+name = "core-foundation"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
+]
+
+[[package]]
+name = "core-foundation-sys"
+version = "0.8.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
+
[[package]]
name = "core-models"
version = "0.0.5"
@@ -535,7 +594,7 @@ checksum = "657f625ff361906f779745d08375ae3cc9fef87a35fba5f22874cf773010daf4"
dependencies = [
"hax-lib",
"pastey",
- "rand 0.9.4",
+ "rand 0.9.5",
]
[[package]]
@@ -549,9 +608,9 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201"
+checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
dependencies = [
"libc",
]
@@ -606,18 +665,18 @@ checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
[[package]]
name = "crossbeam-channel"
-version = "0.5.15"
+version = "0.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2"
+checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-deque"
-version = "0.8.6"
+version = "0.8.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
+checksum = "5181e0de7b61eb03a81e347d6dd8797bae9da5146707b51077e2d71a54ec0ceb"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
@@ -625,18 +684,18 @@ dependencies = [
[[package]]
name = "crossbeam-epoch"
-version = "0.9.18"
+version = "0.9.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
+checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
-version = "0.8.21"
+version = "0.8.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
+checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
[[package]]
name = "crunchy"
@@ -707,14 +766,45 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "data-encoding"
-version = "2.10.0"
+version = "2.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06"
+
+[[package]]
+name = "defmt"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
+checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1"
+dependencies = [
+ "bitflags 1.3.2",
+ "defmt-macros",
+]
+
+[[package]]
+name = "defmt-macros"
+version = "1.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8"
+dependencies = [
+ "defmt-parser",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "defmt-parser"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e"
+dependencies = [
+ "thiserror",
+]
[[package]]
name = "der"
@@ -745,9 +835,6 @@ name = "deranged"
version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
-dependencies = [
- "powerfmt",
-]
[[package]]
name = "digest"
@@ -772,13 +859,13 @@ dependencies = [
[[package]]
name = "displaydoc"
-version = "0.2.5"
+version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
@@ -803,9 +890,9 @@ dependencies = [
[[package]]
name = "either"
-version = "1.15.0"
+version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
+checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
[[package]]
name = "elliptic-curve"
@@ -827,23 +914,11 @@ dependencies = [
"zeroize",
]
-[[package]]
-name = "enum-as-inner"
-version = "0.6.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn",
-]
-
[[package]]
name = "env_filter"
-version = "1.0.1"
+version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32e90c2accc4b07a8456ea0debdc2e7587bdd890680d71173a15d4ae604f6eef"
+checksum = "900d271a03799a1ee8d1ca9b19893b48ca674a9284fefcfb85f05e74ed314217"
dependencies = [
"log",
"regex",
@@ -851,9 +926,9 @@ dependencies = [
[[package]]
name = "env_logger"
-version = "0.11.10"
+version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0621c04f2196ac3f488dd583365b9c09be011a4ab8b9f37248ffcc8f6198b56a"
+checksum = "de671bd27a75a797dc9ae289ba1e77276e75e2026408aab65185384e2d5cd3f6"
dependencies = [
"anstream",
"anstyle",
@@ -886,9 +961,9 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "find-msvc-tools"
-version = "0.1.9"
+version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
+checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"
[[package]]
name = "fnv"
@@ -934,44 +1009,56 @@ checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
[[package]]
name = "futures-channel"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
dependencies = [
"futures-core",
]
[[package]]
name = "futures-core"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
[[package]]
name = "futures-io"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718"
+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
[[package]]
name = "futures-sink"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
[[package]]
name = "futures-task"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
[[package]]
name = "futures-util"
-version = "0.3.32"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
dependencies = [
"futures-core",
+ "futures-macro",
"futures-task",
"pin-project-lite",
"slab",
@@ -1013,16 +1100,14 @@ dependencies = [
[[package]]
name = "getrandom"
-version = "0.4.2"
+version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555"
+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
dependencies = [
"cfg-if",
"libc",
"r-efi 6.0.0",
"rand_core 0.10.1",
- "wasip2",
- "wasip3",
]
[[package]]
@@ -1037,9 +1122,9 @@ dependencies = [
[[package]]
name = "glob"
-version = "0.3.3"
+version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
+checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
[[package]]
name = "graviola"
@@ -1064,9 +1149,9 @@ dependencies = [
[[package]]
name = "h2"
-version = "0.4.13"
+version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
+checksum = "ef8e5e5a340588f4452631496976cf8636d4a7ecf600239fdc27615d2530bc16"
dependencies = [
"atomic-waker",
"bytes",
@@ -1103,9 +1188,9 @@ dependencies = [
[[package]]
name = "hashbrown"
-version = "0.17.0"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
[[package]]
name = "hax-lib"
@@ -1128,7 +1213,7 @@ dependencies = [
"proc-macro-error2",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -1157,26 +1242,25 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"
[[package]]
-name = "hickory-proto"
-version = "0.25.2"
+name = "hickory-net"
+version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502"
+checksum = "c480823ed7c2c5d0f09c41020cb6b7c28029ce60ec42dc942158dcf22f8e0a4d"
dependencies = [
"async-trait",
"bytes",
"cfg-if",
"data-encoding",
- "enum-as-inner",
"futures-channel",
"futures-io",
"futures-util",
"h2",
+ "hickory-proto",
"http",
"idna",
"ipnet",
- "once_cell",
- "rand 0.9.4",
- "ring",
+ "jni",
+ "rand 0.10.2",
"rustls",
"thiserror",
"tinyvec",
@@ -1184,31 +1268,56 @@ dependencies = [
"tokio-rustls",
"tracing",
"url",
- "webpki-roots 0.26.11",
+ "webpki-roots",
+]
+
+[[package]]
+name = "hickory-proto"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "12b92608f679a6fa515dd1d15c1ff89443026e391200a2c840c7afcba482893d"
+dependencies = [
+ "data-encoding",
+ "idna",
+ "ipnet",
+ "jni",
+ "once_cell",
+ "prefix-trie",
+ "rand 0.10.2",
+ "ring",
+ "thiserror",
+ "tinyvec",
+ "tracing",
+ "url",
]
[[package]]
name = "hickory-resolver"
-version = "0.25.2"
+version = "0.26.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a"
+checksum = "3f3da5255c95d5a716857d54b5b8f4e8d67c3484d3beaaaae2ce25063b3ba981"
dependencies = [
"cfg-if",
"futures-util",
+ "hickory-net",
"hickory-proto",
"ipconfig",
+ "ipnet",
+ "jni",
"moka",
+ "ndk-context",
"once_cell",
"parking_lot",
- "rand 0.9.4",
+ "rand 0.10.2",
"resolv-conf",
"rustls",
"smallvec",
+ "system-configuration",
"thiserror",
"tokio",
"tokio-rustls",
"tracing",
- "webpki-roots 0.26.11",
+ "webpki-roots",
]
[[package]]
@@ -1267,7 +1376,7 @@ dependencies = [
"libcrux-hkdf",
"libcrux-kem",
"libcrux-traits",
- "rand 0.10.1",
+ "rand 0.10.2",
"rand_chacha 0.10.0",
"rand_core 0.10.1",
"zeroize",
@@ -1286,7 +1395,7 @@ dependencies = [
"k256",
"p256",
"p384",
- "rand 0.8.6",
+ "rand 0.8.8",
"rand_chacha 0.3.1",
"rand_core 0.10.1",
"rand_core 0.6.4",
@@ -1298,9 +1407,9 @@ dependencies = [
[[package]]
name = "http"
-version = "1.4.0"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a"
+checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"
dependencies = [
"bytes",
"itoa",
@@ -1308,18 +1417,18 @@ dependencies = [
[[package]]
name = "hybrid-array"
-version = "0.4.12"
+version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da"
+checksum = "27f864f10dfb56725ce5ce5472bc52252c8f93a4ab86327122cebf62c5f59a17"
dependencies = [
"typenum",
]
[[package]]
name = "icu_collections"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2984d1cd16c883d7935b9e07e44071dca8d917fd52ecc02c04d5fa0b5a3f191c"
+checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513"
dependencies = [
"displaydoc",
"potential_utf",
@@ -1331,9 +1440,9 @@ dependencies = [
[[package]]
name = "icu_locale_core"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29"
+checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb"
dependencies = [
"displaydoc",
"litemap",
@@ -1344,9 +1453,9 @@ dependencies = [
[[package]]
name = "icu_normalizer"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c56e5ee99d6e3d33bd91c5d85458b6005a22140021cc324cea84dd0e72cff3b4"
+checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f"
dependencies = [
"icu_collections",
"icu_normalizer_data",
@@ -1358,16 +1467,17 @@ dependencies = [
[[package]]
name = "icu_normalizer_data"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da3be0ae77ea334f4da67c12f149704f19f81d1adf7c51cf482943e84a2bad38"
+checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0"
[[package]]
name = "icu_properties"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bee3b67d0ea5c2cca5003417989af8996f8604e34fb9ddf96208a033901e70de"
+checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148"
dependencies = [
+ "displaydoc",
"icu_collections",
"icu_locale_core",
"icu_properties_data",
@@ -1378,15 +1488,15 @@ dependencies = [
[[package]]
name = "icu_properties_data"
-version = "2.2.0"
+version = "2.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e2bbb201e0c04f7b4b3e14382af113e17ba4f63e2c9d2ee626b720cbce54a14"
+checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa"
[[package]]
name = "icu_provider"
-version = "2.2.0"
+version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421"
+checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73"
dependencies = [
"displaydoc",
"icu_locale_core",
@@ -1397,12 +1507,6 @@ dependencies = [
"zerovec",
]
-[[package]]
-name = "id-arena"
-version = "2.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
-
[[package]]
name = "idna"
version = "1.1.0"
@@ -1416,9 +1520,9 @@ dependencies = [
[[package]]
name = "idna_adapter"
-version = "1.2.1"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"
+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"
dependencies = [
"icu_normalizer",
"icu_properties",
@@ -1426,14 +1530,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.14.0"
+version = "2.14.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
+checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb"
dependencies = [
"equivalent",
- "hashbrown 0.17.0",
- "serde",
- "serde_core",
+ "hashbrown 0.17.1",
]
[[package]]
@@ -1460,9 +1562,12 @@ dependencies = [
[[package]]
name = "ipnet"
-version = "2.12.0"
+version = "2.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
+checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78"
+dependencies = [
+ "serde",
+]
[[package]]
name = "is_terminal_polyfill"
@@ -1505,10 +1610,12 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
[[package]]
name = "jiff"
-version = "0.2.23"
+version = "0.2.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359"
+checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc"
dependencies = [
+ "defmt",
+ "jiff-core",
"jiff-static",
"log",
"portable-atomic",
@@ -1516,15 +1623,74 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "jiff-core"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09"
+dependencies = [
+ "defmt",
+]
+
[[package]]
name = "jiff-static"
-version = "0.2.23"
+version = "0.2.35"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204"
+dependencies = [
+ "jiff-core",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "jni"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"
+dependencies = [
+ "cfg-if",
+ "combine",
+ "jni-macros",
+ "jni-sys",
+ "log",
+ "simd_cesu8",
+ "thiserror",
+ "walkdir",
+ "windows-link",
+]
+
+[[package]]
+name = "jni-macros"
+version = "0.22.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4"
+checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "rustc_version",
+ "simd_cesu8",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "jni-sys"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"
+dependencies = [
+ "jni-sys-macros",
+]
+
+[[package]]
+name = "jni-sys-macros"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"
+dependencies = [
+ "quote",
+ "syn 2.0.119",
]
[[package]]
@@ -1539,11 +1705,12 @@ dependencies = [
[[package]]
name = "js-sys"
-version = "0.3.95"
+version = "0.3.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca"
+checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"
dependencies = [
- "once_cell",
+ "cfg-if",
+ "futures-util",
"wasm-bindgen",
]
@@ -1559,12 +1726,12 @@ dependencies = [
[[package]]
name = "keccak"
-version = "0.2.0"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e24a010dd405bd7ed803e5253182815b41bf2e6a80cc3bfc066658e03a198aa"
+checksum = "d8f198d1db720e4940b5a493201d199d9f24f568f8f746bd13706243a2f71598"
dependencies = [
"cfg-if",
- "cpufeatures 0.3.0",
+ "cpufeatures 0.3.1",
]
[[package]]
@@ -1576,17 +1743,11 @@ dependencies = [
"spin",
]
-[[package]]
-name = "leb128fmt"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
-
[[package]]
name = "libc"
-version = "0.2.185"
+version = "0.2.189"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f"
+checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
[[package]]
name = "libcrux-aead"
@@ -1645,7 +1806,7 @@ checksum = "b65f73ce79337c762eb38bbac91e4c9b9e60cf318e8501b812750c640814d45e"
dependencies = [
"libcrux-curve25519",
"libcrux-p256",
- "rand 0.9.4",
+ "rand 0.9.5",
]
[[package]]
@@ -1701,7 +1862,7 @@ dependencies = [
"libcrux-p256",
"libcrux-sha3",
"libcrux-traits",
- "rand 0.9.4",
+ "rand 0.9.5",
]
[[package]]
@@ -1711,7 +1872,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffd6aa2dcd5be681662001b81d493f1569c6d49a32361f470b0c955465cd0338"
dependencies = [
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -1726,7 +1887,7 @@ dependencies = [
"libcrux-secrets",
"libcrux-sha3",
"libcrux-traits",
- "rand 0.9.4",
+ "rand 0.9.5",
"tls_codec",
]
@@ -1801,7 +1962,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "812e4fa89f3f5e34b47f928b22b1b78395a0d4ec23b1f583db635f128159d65f"
dependencies = [
"libcrux-secrets",
- "rand 0.9.4",
+ "rand 0.9.5",
]
[[package]]
@@ -1822,9 +1983,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
[[package]]
name = "litemap"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0"
+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"
[[package]]
name = "lock_api"
@@ -1837,31 +1998,31 @@ dependencies = [
[[package]]
name = "log"
-version = "0.4.29"
+version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
[[package]]
name = "macro_rules_attribute"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520"
+checksum = "b3ae8f6d608c795738406608304d30a2dfbdc8e58e44f7ba43236da5208ded3c"
dependencies = [
"macro_rules_attribute-proc_macro",
- "paste",
+ "pastey",
]
[[package]]
name = "macro_rules_attribute-proc_macro"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30"
+checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c"
[[package]]
name = "memchr"
-version = "2.8.0"
+version = "2.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
[[package]]
name = "minimal-lexical"
@@ -1871,9 +2032,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "mio"
-version = "1.2.0"
+version = "1.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1"
+checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"
dependencies = [
"libc",
"log",
@@ -1883,9 +2044,9 @@ dependencies = [
[[package]]
name = "moka"
-version = "0.12.15"
+version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "957228ad12042ee839f93c8f257b62b4c0ab5eaae1d4fa60de53b27c9d7c5046"
+checksum = "4293f18e7567a1caf3c584855554377025c65e0aa445344d04171f5ad63d19b9"
dependencies = [
"crossbeam-channel",
"crossbeam-epoch",
@@ -1898,13 +2059,19 @@ dependencies = [
"uuid",
]
+[[package]]
+name = "ndk-context"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"
+
[[package]]
name = "nix"
version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [
- "bitflags",
+ "bitflags 2.13.1",
"cfg-if",
"cfg_aliases",
"libc",
@@ -1922,9 +2089,9 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.4.6"
+version = "0.4.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
+checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"
dependencies = [
"num-integer",
"num-traits",
@@ -1941,33 +2108,32 @@ dependencies = [
"num-integer",
"num-iter",
"num-traits",
- "rand 0.8.6",
+ "rand 0.8.8",
"smallvec",
"zeroize",
]
[[package]]
name = "num-conv"
-version = "0.2.1"
+version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967"
+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"
[[package]]
name = "num-integer"
-version = "0.1.46"
+version = "0.1.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
+checksum = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
dependencies = [
"num-traits",
]
[[package]]
name = "num-iter"
-version = "0.1.45"
+version = "0.1.46"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
+checksum = "c92800bd69a1eac91786bcfe9da64a897eb72911b8dc3095decbd07429e8048b"
dependencies = [
- "autocfg",
"num-integer",
"num-traits",
]
@@ -2021,15 +2187,14 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
[[package]]
name = "openssl"
-version = "0.10.78"
+version = "0.10.81"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222"
+checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
dependencies = [
- "bitflags",
+ "bitflags 2.13.1",
"cfg-if",
"foreign-types",
"libc",
- "once_cell",
"openssl-macros",
"openssl-sys",
]
@@ -2042,14 +2207,14 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "openssl-sys"
-version = "0.9.114"
+version = "0.9.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6"
+checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
dependencies = [
"cc",
"libc",
@@ -2102,25 +2267,19 @@ dependencies = [
"windows-link",
]
-[[package]]
-name = "paste"
-version = "1.0.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
-
[[package]]
name = "pastey"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c5a797f0e07bdf071d15742978fc3128ec6c22891c31a3a931513263904c982a"
+checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4"
[[package]]
name = "pem"
-version = "3.0.6"
+version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be"
+checksum = "d354a98a3d1251555de99e8fdd8afda05573c31b82f59063a7b0a29b5527f120"
dependencies = [
- "base64",
+ "base64 0.23.1",
"serde_core",
]
@@ -2159,9 +2318,9 @@ dependencies = [
[[package]]
name = "pkg-config"
-version = "0.3.33"
+version = "0.3.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
+checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"
[[package]]
name = "plotters"
@@ -2216,9 +2375,9 @@ dependencies = [
[[package]]
name = "portable-atomic"
-version = "1.13.1"
+version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
[[package]]
name = "portable-atomic-util"
@@ -2231,9 +2390,9 @@ dependencies = [
[[package]]
name = "potential_utf"
-version = "0.1.5"
+version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564"
+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"
dependencies = [
"zerovec",
]
@@ -2253,6 +2412,17 @@ dependencies = [
"zerocopy",
]
+[[package]]
+name = "prefix-trie"
+version = "0.8.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4cf6e3177f0684016a5c209b00882e15f8bdd3f3bb48f0491df10cd102d0c6e7"
+dependencies = [
+ "either",
+ "ipnet",
+ "num-traits",
+]
+
[[package]]
name = "prettyplease"
version = "0.2.37"
@@ -2260,7 +2430,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
dependencies = [
"proc-macro2",
- "syn",
+ "syn 2.0.119",
]
[[package]]
@@ -2291,23 +2461,23 @@ dependencies = [
"proc-macro-error-attr2",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "proc-macro2"
-version = "1.0.106"
+version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
-version = "1.0.45"
+version = "1.0.47"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
dependencies = [
"proc-macro2",
]
@@ -2326,9 +2496,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
[[package]]
name = "rand"
-version = "0.8.6"
+version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a"
+checksum = "e058c7de0b26af77780c769414d6257830bb240f3c38477dbc2c16e5f54d6d4c"
dependencies = [
"libc",
"rand_chacha 0.3.1",
@@ -2337,9 +2507,9 @@ dependencies = [
[[package]]
name = "rand"
-version = "0.9.4"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
+checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
dependencies = [
"rand_chacha 0.9.0",
"rand_core 0.9.5",
@@ -2347,11 +2517,12 @@ dependencies = [
[[package]]
name = "rand"
-version = "0.10.1"
+version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
+checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
dependencies = [
- "getrandom 0.4.2",
+ "chacha20 0.10.2",
+ "getrandom 0.4.3",
"rand_core 0.10.1",
]
@@ -2431,9 +2602,9 @@ dependencies = [
[[package]]
name = "rcgen"
-version = "0.14.7"
+version = "0.14.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "10b99e0098aa4082912d4c649628623db6aba77335e4f4569ff5083a6448b32e"
+checksum = "8774e05a7d0de114588e6a28fe7e71694b82614ed569d86d8b389dfbc98b8ad8"
dependencies = [
"aws-lc-rs",
"pem",
@@ -2449,14 +2620,14 @@ version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
- "bitflags",
+ "bitflags 2.13.1",
]
[[package]]
name = "regex"
-version = "1.12.3"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"
dependencies = [
"aho-corasick",
"memchr",
@@ -2466,9 +2637,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.14"
+version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
dependencies = [
"aho-corasick",
"memchr",
@@ -2477,9 +2648,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.10"
+version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "resolv-conf"
@@ -2558,35 +2729,17 @@ dependencies = [
[[package]]
name = "rustls"
-version = "0.23.40"
+version = "0.23.46"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
dependencies = [
"aws-lc-rs",
- "base64",
- "bencher",
- "brotli",
- "brotli-decompressor",
- "env_logger",
- "hashbrown 0.15.5",
- "hex",
"log",
- "macro_rules_attribute",
- "num-bigint",
"once_cell",
- "rcgen",
- "ring",
"rustls-pki-types",
- "rustls-test",
"rustls-webpki",
- "rustversion",
- "serde",
- "serde_json",
- "shake",
"subtle",
- "time",
- "webpki-roots 1.0.7",
- "x509-parser 0.17.0",
"zeroize",
- "zlib-rs",
]
[[package]]
@@ -2594,10 +2747,10 @@ name = "rustls-bench"
version = "0.1.0"
dependencies = [
"clap",
- "rustls",
"rustls-graviola",
"rustls-post-quantum",
"rustls-test",
+ "shaped-rustls",
"tikv-jemallocator",
]
@@ -2613,9 +2766,9 @@ dependencies = [
"itertools 0.14.0",
"rayon",
"rustc-hash",
- "rustls",
"rustls-fuzzing-provider",
"rustls-test",
+ "shaped-rustls",
"tikv-jemallocator",
]
@@ -2623,10 +2776,9 @@ dependencies = [
name = "rustls-connect-tests"
version = "0.0.1"
dependencies = [
- "hickory-resolver",
"regex",
"ring",
- "rustls",
+ "shaped-rustls",
"tokio",
]
@@ -2640,10 +2792,10 @@ dependencies = [
"log",
"mio",
"rcgen",
- "rustls",
"serde",
+ "shaped-rustls",
"tokio",
- "webpki-roots 1.0.7",
+ "webpki-roots",
]
[[package]]
@@ -2651,7 +2803,7 @@ name = "rustls-fuzzing-provider"
version = "0.1.0"
dependencies = [
"env_logger",
- "rustls",
+ "shaped-rustls",
]
[[package]]
@@ -2669,18 +2821,18 @@ name = "rustls-openssl-tests"
version = "0.0.1"
dependencies = [
"asn1",
- "base64",
+ "base64 0.22.1",
"num-bigint",
"once_cell",
"openssl",
- "rustls",
+ "shaped-rustls",
]
[[package]]
name = "rustls-pki-types"
-version = "1.14.0"
+version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd"
+checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96"
dependencies = [
"zeroize",
]
@@ -2691,8 +2843,8 @@ version = "0.2.2"
dependencies = [
"criterion",
"env_logger",
- "rustls",
- "webpki-roots 1.0.7",
+ "shaped-rustls",
+ "webpki-roots",
]
[[package]]
@@ -2712,10 +2864,10 @@ dependencies = [
"rand_core 0.6.4",
"rcgen",
"rsa",
- "rustls",
"sha2",
+ "shaped-rustls",
"signature",
- "webpki-roots 1.0.7",
+ "webpki-roots",
"x25519-dalek",
]
@@ -2724,24 +2876,24 @@ name = "rustls-provider-test"
version = "0.1.0"
dependencies = [
"hex",
- "rustls",
"rustls-provider-example",
"serde",
"serde_json",
+ "shaped-rustls",
]
[[package]]
name = "rustls-test"
version = "0.1.0"
dependencies = [
- "rustls",
+ "shaped-rustls",
]
[[package]]
name = "rustls-webpki"
-version = "0.103.13"
+version = "0.103.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e"
+checksum = "e3a0760a887c14823fca5a1c970b01d47c328c696c0c64829d1df50e8f853fd5"
dependencies = [
"aws-lc-rs",
"ring",
@@ -2751,9 +2903,9 @@ dependencies = [
[[package]]
name = "rustversion"
-version = "1.0.22"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
[[package]]
name = "same-file"
@@ -2792,9 +2944,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
[[package]]
name = "serde"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
dependencies = [
"serde_core",
"serde_derive",
@@ -2802,29 +2954,29 @@ dependencies = [
[[package]]
name = "serde_core"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.228"
+version = "1.0.229"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
name = "serde_json"
-version = "1.0.149"
+version = "1.0.151"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
+checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
dependencies = [
"itoa",
"memchr",
@@ -2855,12 +3007,51 @@ dependencies = [
"sponge-cursor",
]
+[[package]]
+name = "shaped-rustls"
+version = "0.23.4600"
+dependencies = [
+ "aws-lc-rs",
+ "base64 0.22.1",
+ "bencher",
+ "brotli",
+ "brotli-decompressor",
+ "env_logger",
+ "hashbrown 0.15.5",
+ "hex",
+ "log",
+ "macro_rules_attribute",
+ "num-bigint",
+ "once_cell",
+ "rcgen",
+ "ring",
+ "rustls-pki-types",
+ "rustls-test",
+ "rustls-webpki",
+ "rustversion",
+ "serde",
+ "serde_json",
+ "shake",
+ "subtle",
+ "time",
+ "webpki-roots",
+ "x509-parser 0.17.0",
+ "zeroize",
+ "zlib-rs",
+]
+
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
+[[package]]
+name = "shlex"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
+
[[package]]
name = "signature"
version = "2.2.0"
@@ -2871,6 +3062,22 @@ dependencies = [
"rand_core 0.6.4",
]
+[[package]]
+name = "simd_cesu8"
+version = "1.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520"
+dependencies = [
+ "rustc_version",
+ "simdutf8",
+]
+
+[[package]]
+name = "simdutf8"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
+
[[package]]
name = "slab"
version = "0.4.12"
@@ -2879,15 +3086,15 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
[[package]]
name = "smallvec"
-version = "1.15.1"
+version = "1.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
+checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
[[package]]
name = "socket2"
-version = "0.6.3"
+version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e"
+checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"
dependencies = [
"libc",
"windows-sys 0.61.2",
@@ -2895,9 +3102,9 @@ dependencies = [
[[package]]
name = "spin"
-version = "0.9.8"
+version = "0.9.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
+checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e"
[[package]]
name = "spki"
@@ -2935,9 +3142,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
-version = "2.0.117"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
dependencies = [
"proc-macro2",
"quote",
@@ -2952,7 +3170,28 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "system-configuration"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b"
+dependencies = [
+ "bitflags 2.13.1",
+ "core-foundation",
+ "system-configuration-sys",
+]
+
+[[package]]
+name = "system-configuration-sys"
+version = "0.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
+dependencies = [
+ "core-foundation-sys",
+ "libc",
]
[[package]]
@@ -2963,22 +3202,22 @@ checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
[[package]]
name = "thiserror"
-version = "2.0.18"
+version = "2.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
+checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
-version = "2.0.18"
+version = "2.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
+checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
@@ -3003,12 +3242,11 @@ dependencies = [
[[package]]
name = "time"
-version = "0.3.47"
+version = "0.3.55"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"
dependencies = [
"deranged",
- "itoa",
"num-conv",
"powerfmt",
"serde_core",
@@ -3018,15 +3256,15 @@ dependencies = [
[[package]]
name = "time-core"
-version = "0.1.8"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"
[[package]]
name = "time-macros"
-version = "0.2.27"
+version = "0.2.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
+checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"
dependencies = [
"num-conv",
"time-core",
@@ -3034,9 +3272,9 @@ dependencies = [
[[package]]
name = "tinystr"
-version = "0.8.3"
+version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d"
+checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643"
dependencies = [
"displaydoc",
"zerovec",
@@ -3054,9 +3292,9 @@ dependencies = [
[[package]]
name = "tinyvec"
-version = "1.11.0"
+version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3"
+checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"
dependencies = [
"tinyvec_macros",
]
@@ -3085,14 +3323,14 @@ checksum = "2d2e76690929402faae40aebdda620a2c0e25dd6d3b9afe48867dfd95991f4bd"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "tokio"
-version = "1.52.3"
+version = "1.54.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"
+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"
dependencies = [
"bytes",
"libc",
@@ -3105,13 +3343,13 @@ dependencies = [
[[package]]
name = "tokio-macros"
-version = "2.7.0"
+version = "2.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496"
+checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
@@ -3124,25 +3362,16 @@ dependencies = [
"tokio",
]
-[[package]]
-name = "tokio-rustls-smoke"
-version = "0.0.0"
-dependencies = [
- "rcgen",
- "rustls",
- "tokio",
- "tokio-rustls",
-]
-
[[package]]
name = "tokio-util"
-version = "0.7.18"
+version = "0.7.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098"
+checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"
dependencies = [
"bytes",
"futures-core",
"futures-sink",
+ "libc",
"pin-project-lite",
"tokio",
]
@@ -3168,9 +3397,9 @@ dependencies = [
[[package]]
name = "typenum"
-version = "1.20.0"
+version = "1.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de"
+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
[[package]]
name = "unicode-ident"
@@ -3178,12 +3407,6 @@ version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
-[[package]]
-name = "unicode-xid"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
-
[[package]]
name = "universal-hash"
version = "0.5.1"
@@ -3232,11 +3455,11 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "uuid"
-version = "1.23.1"
+version = "1.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76"
+checksum = "b5772d71c9be8a8a6ac2117d949c5b224c1b72241bb611d9a3012edcf8af7812"
dependencies = [
- "getrandom 0.4.2",
+ "getrandom 0.4.3",
"js-sys",
"wasm-bindgen",
]
@@ -3271,27 +3494,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
-version = "1.0.3+wasi-0.2.9"
+version = "1.0.4+wasi-0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6"
+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
dependencies = [
- "wit-bindgen 0.57.1",
-]
-
-[[package]]
-name = "wasip3"
-version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
-dependencies = [
- "wit-bindgen 0.51.0",
+ "wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.118"
+version = "0.2.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89"
+checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"
dependencies = [
"cfg-if",
"once_cell",
@@ -3302,9 +3516,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.118"
+version = "0.2.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed"
+checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -3312,65 +3526,31 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.118"
+version = "0.2.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904"
+checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"
dependencies = [
"bumpalo",
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.118"
+version = "0.2.127"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129"
+checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"
dependencies = [
"unicode-ident",
]
-[[package]]
-name = "wasm-encoder"
-version = "0.244.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
-dependencies = [
- "leb128fmt",
- "wasmparser",
-]
-
-[[package]]
-name = "wasm-metadata"
-version = "0.244.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
-dependencies = [
- "anyhow",
- "indexmap",
- "wasm-encoder",
- "wasmparser",
-]
-
-[[package]]
-name = "wasmparser"
-version = "0.244.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
-dependencies = [
- "bitflags",
- "hashbrown 0.15.5",
- "indexmap",
- "semver",
-]
-
[[package]]
name = "web-sys"
-version = "0.3.95"
+version = "0.3.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d"
+checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -3378,18 +3558,9 @@ dependencies = [
[[package]]
name = "webpki-roots"
-version = "0.26.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
-dependencies = [
- "webpki-roots 1.0.7",
-]
-
-[[package]]
-name = "webpki-roots"
-version = "1.0.7"
+version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52f5ee44c96cf55f1b349600768e3ece3a8f26010c05265ab73f945bb1a2eb9d"
+checksum = "7265c9301c16a8711c992c2d8da90ee77ef54b1ed51482d6dfeb00dc756b1297"
dependencies = [
"rustls-pki-types",
]
@@ -3526,105 +3697,17 @@ version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-[[package]]
-name = "wit-bindgen"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
-dependencies = [
- "wit-bindgen-rust-macro",
-]
-
[[package]]
name = "wit-bindgen"
version = "0.57.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
-[[package]]
-name = "wit-bindgen-core"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
-dependencies = [
- "anyhow",
- "heck",
- "wit-parser",
-]
-
-[[package]]
-name = "wit-bindgen-rust"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
-dependencies = [
- "anyhow",
- "heck",
- "indexmap",
- "prettyplease",
- "syn",
- "wasm-metadata",
- "wit-bindgen-core",
- "wit-component",
-]
-
-[[package]]
-name = "wit-bindgen-rust-macro"
-version = "0.51.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
-dependencies = [
- "anyhow",
- "prettyplease",
- "proc-macro2",
- "quote",
- "syn",
- "wit-bindgen-core",
- "wit-bindgen-rust",
-]
-
-[[package]]
-name = "wit-component"
-version = "0.244.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
-dependencies = [
- "anyhow",
- "bitflags",
- "indexmap",
- "log",
- "serde",
- "serde_derive",
- "serde_json",
- "wasm-encoder",
- "wasm-metadata",
- "wasmparser",
- "wit-parser",
-]
-
-[[package]]
-name = "wit-parser"
-version = "0.244.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
-dependencies = [
- "anyhow",
- "id-arena",
- "indexmap",
- "log",
- "semver",
- "serde",
- "serde_derive",
- "serde_json",
- "unicode-xid",
- "wasmparser",
-]
-
[[package]]
name = "writeable"
-version = "0.6.3"
+version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4"
+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"
[[package]]
name = "x25519-dalek"
@@ -3675,18 +3758,19 @@ dependencies = [
[[package]]
name = "yasna"
-version = "0.5.2"
+version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd"
+checksum = "b5f6765e852b9b4dc8e2a76843e4d64d1cea8e79bcde0b6901aea8e7c7f08282"
dependencies = [
+ "bit-vec",
"time",
]
[[package]]
name = "yoke"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca"
+checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"
dependencies = [
"stable_deref_trait",
"yoke-derive",
@@ -3701,35 +3785,35 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
"synstructure",
]
[[package]]
name = "zerocopy"
-version = "0.8.48"
+version = "0.8.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9"
+checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.48"
+version = "0.8.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4"
+checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "zerofrom"
-version = "0.1.7"
+version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df"
+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
dependencies = [
"zerofrom-derive",
]
@@ -3742,7 +3826,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
"synstructure",
]
@@ -3757,20 +3841,20 @@ dependencies = [
[[package]]
name = "zeroize_derive"
-version = "1.4.3"
+version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e"
+checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 2.0.119",
]
[[package]]
name = "zerotrie"
-version = "0.2.4"
+version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f9152d31db0792fa83f70fb2f83148effb5c1f5b8c7686c3459e361d9bc20bf"
+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"
dependencies = [
"displaydoc",
"yoke",
@@ -3779,9 +3863,9 @@ dependencies = [
[[package]]
name = "zerovec"
-version = "0.11.6"
+version = "0.11.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239"
+checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8"
dependencies = [
"yoke",
"zerofrom",
@@ -3790,23 +3874,23 @@ dependencies = [
[[package]]
name = "zerovec-derive"
-version = "0.11.3"
+version = "0.11.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555"
+checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da"
dependencies = [
"proc-macro2",
"quote",
- "syn",
+ "syn 3.0.4",
]
[[package]]
name = "zlib-rs"
-version = "0.6.3"
+version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513"
+checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12"
[[package]]
name = "zmij"
-version = "1.0.21"
+version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff --git a/Cargo.toml b/Cargo.toml
index a1a1ddad308..5b132b0d880 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,8 +6,6 @@ members = [
"ci-bench",
# Network-based tests
"connect-tests",
- # tokio-rustls compatibility smoke test
- "tokio-rustls-smoke",
# tests and example code
"examples",
# Tests that require OpenSSL
@@ -45,7 +43,7 @@ resolver = "2"
anyhow = "1.0.73"
asn1 = "0.22"
async-trait = "0.1.74"
-aws-lc-rs = { version = "1.14", default-features = false }
+aws-lc-rs = { version = "1.18", default-features = false }
base64 = "0.22"
bencher = "0.1.5"
brotli = { version = "8", default-features = false, features = ["std"] }
@@ -60,7 +58,7 @@ ecdsa = "0.16.8"
env_logger = "0.11"
hashbrown = { version = "0.15", default-features = false, features = ["default-hasher", "inline-more"] }
hex = "0.4"
-hickory-resolver = { version = "0.25", features = ["https-aws-lc-rs", "webpki-roots"] }
+hickory-resolver = { version = "0.26", features = ["https-aws-lc-rs", "webpki-roots"] }
hmac = "0.12"
hpke-rs = "0.6"
hpke-rs-crypto = "0.6"
@@ -94,7 +92,7 @@ subtle = { version = "2.5.0", default-features = false }
time = { version = "0.3.6", default-features = false }
tikv-jemallocator = "0.6"
tokio = { version = "1.34", features = ["io-util", "macros", "net", "rt"] }
-webpki = { package = "rustls-webpki", version = "0.103.5", features = ["alloc"], default-features = false }
+webpki = { package = "rustls-webpki", version = "0.103.14", features = ["alloc"], default-features = false }
webpki-roots = "1"
x25519-dalek = "2"
x509-parser = "0.17"
@@ -104,8 +102,3 @@ zlib-rs = "0.6"
[profile.bench]
codegen-units = 1
lto = true
-
-# ensure all our tests are against the local copy, never
-# against the latest _published_ copy.
-[patch.crates-io]
-rustls = { path = "rustls" }
diff --git a/README.md b/README.md
index 6a4449b7a00..92826daa7a1 100644
--- a/README.md
+++ b/README.md
@@ -6,16 +6,50 @@
Rustls is a modern TLS library written in Rust.
-# shaped-rustls ClientHello shaping branch
-
-This branch is based on rustls `0.23.40` and adds opt-in ClientHello shaping
-support for xray/uTLS-compatible fingerprints.
+# shaped-rustls
+
+shaped-rustls is a fork of [rustls](https://github.com/rustls/rustls) with an
+opt-in API for shaping the TLS ClientHello, so that a client can send the hello
+of a browser or of a uTLS profile byte for byte. It is not affiliated with or
+endorsed by the rustls project: please report its bugs
+[here](https://github.com/aimalygin/shaped-rustls/issues), not upstream.
+
+This release is rustls `0.23.46` with the shaping API on top. Everything below
+the next heading is upstream's own README.
+
+The shaping API is dormant unless an application installs a
+`ClientHelloCustomizer` on its `ClientConfig`; without one the crate sends what
+upstream sends. `admin/check-clienthello-compat` compares the default
+ClientHello of this checkout with the upstream tag byte for byte, normalizing
+only the fields that must vary (the random, the session ID and the key share
+bytes).
+
+Two things differ from upstream whether or not a customizer is installed:
+
+* an unknown extension in a TLS 1.3 certificate entry is ignored, where
+ upstream rejects the message. A shaped hello can offer extensions rustls does
+ not implement, and a peer may answer one there; Go's `crypto/tls` ignores
+ them as well. The BoGo test `SendUnknownExtensionOnCertificate-TLS13` is
+ disabled for that reason;
+* the minimum Rust version is 1.85, not 1.71, because of the `shake`
+ dependency of the `aws_lc_rs` feature.
+
+## Using it
+
+The package is named `shaped-rustls`, and its library is still named `rustls`,
+so code written for rustls compiles against it unchanged:
+
+```toml
+[dependencies]
+rustls = { package = "shaped-rustls", version = "0.23.4600" }
+```
-The default rustls behavior is intended to remain compatible with upstream when
-no `ClientHelloCustomizer` is configured. The shaping API is dormant unless an
-application explicitly installs a customizer on `ClientConfig`.
+Crates that depend on the `rustls` package itself, such as tokio-rustls, quinn
+or hyper-rustls, keep using upstream rustls, and its types are not
+interchangeable with this crate's. A shaped hello under one of them needs an
+adapter built against this crate.
-This branch adds primitives for:
+## What it adds
* fixed ClientHello random and session ID values;
* custom and advertised cipher suites;
@@ -24,12 +58,22 @@ This branch adds primitives for:
* GREASE values and GREASE extension placement;
* raw key shares and fixed X25519 key shares, including the classical X25519
component inside hybrid `X25519MLKEM768` key shares;
-* padding and raw ClientHello capture for byte-level verification.
+* padding, including BoringSSL's rule evaluated anew for each flight;
+* a retried ClientHello, after a HelloRetryRequest that names a group, with
+ that group's key share alone, as uTLS sends it;
+* raw ClientHello capture for byte-level verification.
+
+## Versions
+
+A version is `0.23.PPRR`: `PP` is the upstream rustls patch release this one
+is based on and `RR` counts the fork's own releases on that base. `0.23.4600`
+is the first release on rustls `0.23.46`; a fix of the fork alone would be
+`0.23.4601`, and a move to rustls `0.23.47` would be `0.23.4700`. A `^0.23`
+requirement therefore follows both, as it would for rustls.
-The release tag for this work is `xray-rustls-0.23.40-1`. The helper script
-`admin/check-clienthello-compat` compares the default ClientHello emitted by
-this checkout against the upstream rustls tag and normalizes only fields that
-must vary, such as random values and ephemeral key share bytes.
+Security fixes of upstream rustls reach this crate only when it is rebased.
+RustSec advisories are filed against `rustls`, and tools such as `cargo audit`
+do not match them to `shaped-rustls`: check the upstream base named above.
# Status
@@ -37,10 +81,10 @@ Rustls is used in production at many organizations and projects. We aim to maint
reasonable API surface stability but the API may evolve as we make changes to accommodate
new features or performance improvements.
-We have a [roadmap](ROADMAP.md) for our future plans. We also have [benchmarks](BENCHMARKING.md) to
+We have a [roadmap](https://github.com/rustls/rustls/blob/rel-0.23/ROADMAP.md) for our future plans. We also have [benchmarks](https://github.com/rustls/rustls/blob/rel-0.23/BENCHMARKING.md) to
prevent performance regressions and to let you evaluate rustls on your target hardware.
-If you'd like to help out, please see [CONTRIBUTING.md](CONTRIBUTING.md).
+If you'd like to help out, please see [CONTRIBUTING.md](https://github.com/rustls/rustls/blob/rel-0.23/CONTRIBUTING.md).
[](https://github.com/rustls/rustls/actions/workflows/build.yml?query=branch%3Amain)
[](https://codecov.io/gh/rustls/rustls/)
@@ -83,7 +127,7 @@ to a wider set of architectures and environments, or compliance requirements. S
Specifying `default-features = false` when depending on rustls will remove the implicit
dependency on aws-lc-rs.
-Rustls requires Rust 1.71 or later. It has an optional dependency on zlib-rs which requires 1.75 or later.
+This fork requires Rust 1.85 or later, where upstream rustls requires 1.71: the `aws_lc_rs` feature, on by default, depends on the `shake` crate, which sets that floor.
[ring-target-platforms]: https://github.com/briansmith/ring/blob/2e8363b433fa3b3962c877d9ed2e9145612f3160/include/ring-core/target.h#L18-L64
[`crypto::CryptoProvider`]: https://docs.rs/rustls/latest/rustls/crypto/struct.CryptoProvider.html
diff --git a/admin/check-clienthello-compat b/admin/check-clienthello-compat
index 5da46eed415..e6db4dd6a5b 100755
--- a/admin/check-clienthello-compat
+++ b/admin/check-clienthello-compat
@@ -109,10 +109,12 @@ def repo_root():
def default_upstream_ref(root):
cargo_toml = root / "rustls" / "Cargo.toml"
text = cargo_toml.read_text(encoding="utf-8")
- match = re.search(r'(?m)^version = "([^"]+)"$', text)
+ match = re.search(r'(?m)^version = "(\d+)\.(\d+)\.(\d+)"$', text)
if not match:
- raise ValueError(f"could not find rustls version in {cargo_toml}")
- return f"v/{match.group(1)}"
+ raise ValueError(f"could not find the crate version in {cargo_toml}")
+ major, minor, patch = (int(part) for part in match.groups())
+ # A shaped-rustls version is `0.23.PPRR`: upstream patch `PP`, fork release `RR`.
+ return f"v/{major}.{minor}.{patch // 100}"
def ensure_git_ref(root, ref):
@@ -135,7 +137,7 @@ def extract_ref(root, ref, destination):
raise subprocess.CalledProcessError(archive.returncode, archive.args, stderr=stderr)
-def write_harness(path, package_name, rustls_path):
+def write_harness(path, package_name, rustls_path, rustls_package="rustls"):
src = path / "src"
src.mkdir(parents=True, exist_ok=True)
(path / "Cargo.toml").write_text(
@@ -150,7 +152,7 @@ aws_lc_rs = ["rustls/aws_lc_rs"]
tls12 = ["rustls/tls12"]
[dependencies]
-rustls = {{ path = "{rustls_path}", default-features = false, features = ["std"] }}
+rustls = {{ package = "{rustls_package}", path = "{rustls_path}", default-features = false, features = ["std"] }}
""",
encoding="utf-8",
)
@@ -341,7 +343,12 @@ def main():
extract_ref(root, upstream_ref, upstream_root)
write_harness(harness_upstream, "rustls-clienthello-compat-upstream", upstream_root / "rustls")
- write_harness(harness_fork, "rustls-clienthello-compat-fork", root / "rustls")
+ write_harness(
+ harness_fork,
+ "rustls-clienthello-compat-fork",
+ root / "rustls",
+ rustls_package="shaped-rustls",
+ )
print(f"upstream_ref={upstream_ref}")
print(f"tmpdir={temp_root}")
diff --git a/admin/clippy b/admin/clippy
index 32250254c43..b8f19a43137 100755
--- a/admin/clippy
+++ b/admin/clippy
@@ -17,12 +17,17 @@ function run_clippy() {
}
# because examples enable rustls' features, `--workspace --no-default-features` is not
-# the same as `--package rustls --no-default-features` so run it separately
-run_clippy --package rustls --no-default-features --all-targets
+# the same as `--package shaped-rustls --no-default-features` so run it separately
+run_clippy --package shaped-rustls --no-default-features --all-targets
# run all workspace members (individually, because we don't want feature unification)
for p in $(admin/all-workspace-members) ; do
case "$p" in
+ rustls-bench)
+ # rustls-graviola is built against upstream's rustls package, whose types
+ # are not this crate's: the bench cannot take it. Every other feature is linted.
+ ALL_FEATURES="--features aws-lc-rs,fips,post-quantum,ring"
+ ;;
*)
ALL_FEATURES="--all-features"
;;
diff --git a/admin/coverage b/admin/coverage
index 3ede3b233a1..aa42ad3e091 100755
--- a/admin/coverage
+++ b/admin/coverage
@@ -7,8 +7,8 @@ cargo llvm-cov clean --workspace
cargo build --locked --all-targets --all-features
cargo test --locked --all-features
-cargo test -p rustls --locked --no-default-features --features tls12,logging,aws_lc_rs,fips,std
-cargo test -p rustls --locked --no-default-features --features tls12,logging,ring,std
+cargo test -p shaped-rustls --locked --no-default-features --features tls12,logging,aws_lc_rs,fips,std
+cargo test -p shaped-rustls --locked --no-default-features --features tls12,logging,ring,std
# ensure both zlib and brotli are tested, irrespective of their order
cargo test --locked $(admin/all-features-except zlib rustls)
diff --git a/bogo/Cargo.toml b/bogo/Cargo.toml
index d5c9b96b7c1..f5993379415 100644
--- a/bogo/Cargo.toml
+++ b/bogo/Cargo.toml
@@ -8,11 +8,9 @@ publish = false
base64 = { workspace = true }
env_logger = { workspace = true }
nix = { version = "0.30", default-features = false, features = ["signal"] }
-rustls = { path = "../rustls", features = ["aws_lc_rs", "ring", "tls12"] }
-rustls-post-quantum = { path = "../rustls-post-quantum", optional = true }
+rustls = { package = "shaped-rustls", path = "../rustls", features = ["aws_lc_rs", "ring", "tls12"] }
webpki = { workspace = true }
[features]
default = []
-post-quantum = ["dep:rustls-post-quantum"]
fips = ["rustls/fips"]
diff --git a/bogo/config.json.in b/bogo/config.json.in
index 1fa69242e88..5367dcb99fd 100644
--- a/bogo/config.json.in
+++ b/bogo/config.json.in
@@ -1,5 +1,6 @@
{
"DisabledTests": {
+ "SendUnknownExtensionOnCertificate-TLS13": "shaped-rustls ignores an unknown extension in a certificate entry, as Go's crypto/tls does",
"SendV2ClientHello-*": "we only support >=TLS1.2",
"*SSL3*": "we only support >=TLS1.2",
"*TLS1-*": "we only support >=TLS1.2",
@@ -10,6 +11,17 @@
"CertificateSelection-*ClientCertificateTypes-*": "no support for CertificateRequest::certificate_types",
"CertificateSelection-Client-SignatureAlgorithmECDSACurve-TLS-TLS12": "ResolvesClientCert does not receive protocol version",
"CertificateSelection-Server-*": "TODO certificate selection for servers",
+ "CertificateSelection-Client-CertificateType-*": "TODO: no RFC7250 raw public key support",
+ "CertificateSelection-Client-RawPublicKey-*": "TODO: no RFC7250 raw public key support",
+ "ClientCertificateType-*": "TODO: no client_certificate_type extension support",
+ "ServerCertificateType-*": "TODO: no server_certificate_type extension support",
+ "CredentialSessionIDContext-*": "TODO: no session id context support, nor multiple server credentials",
+ "AlternateTooManyEmptyRecordsAndWarningAlerts": "TODO: we don't count interleaved empty records and warning alerts together",
+ "RejectEmptyCertificateAuthorities-*": "TODO: we do not reject an empty certificate_authorities extension",
+ "ServerPadding*": "TODO: no support for the server-side record padding draft",
+ "TLS13-EarlyData-TooMuchData-LargeLimit-Client-*": "TODO: no support for -on-resume-shim-initial-write",
+ "CertificateVerificationPassesOnResume-*": "we do not reverify certificates on resumption, so this passes without exercising anything",
+ "EarlyData-*-Client-Reverify-*": "we do not reverify certificates on resumption, so this passes without exercising anything",
"ConflictingVersionNegotiation": "expects to negotiate TLS1.1",
"SendFallbackSCSV": "fallback scsv not implemented",
"ECDSAKeyUsage-*": "TODO: we don't do anything with key usages",
@@ -23,6 +35,7 @@
"SendUnsolicitedOCSPOnCertificate-TLS13": "we unconditionally request a stapled OCSP response",
"DuplicateCertCompressionExt*-TLS12": "RFC8879: if TLS 1.2 or earlier is negotiated, the peers MUST ignore this extension",
#if defined(RING)
+ "*-ML-DSA-*": "no ML-DSA verification support in *ring*",
"TLS-ECH-*": "*ring* has no HPKE provider for ECH",
"AllExtensions-Client-Permute-ECH-HelloRetryRequest-TLS-TLS13": "requires ECH",
#elif defined(AWS_LC_RS) && defined(FIPS)
@@ -35,11 +48,13 @@
"TLS-ECH-Client-TLS12-RejectRetryConfigs": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-NoClientCertificate-TLS12": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-TLS12": "we disable TLS1.2 w/ ECH",
+ "TLS-ECH-Client-Rejected-OverrideName-TLS12": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-ResumeInnerSession-TLS12": "we disable TLS1.2 w/ ECH",
"TLS-ECH-GREASE-Client-TLS12-RejectRetryConfigs": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-EarlyDataRejected-TLS12": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-NoClientCertificate-TLS12-Async": "we disable TLS1.2 w/ ECH",
"TLS-ECH-Client-Reject-ResumeInnerSession-TLS13": "assumes no outer GREASE PSK, we send GREASE PSK",
+ "TLS-ECH-Client-RejectUnusableConfig-*": "TODO: no support for rejecting unusable ECH configs",
#endif
"ALPS-*": "no ALPS support yet",
"NPN-*": "no NPN support, never",
@@ -50,19 +65,21 @@
"CheckClientCertificateTypes": "we don't check TLS1.2 CertificateRequest.certificate_types",
"*-RSA_PKCS1_SHA256_LEGACY-*": "NYI on our side https://datatracker.ietf.org/doc/draft-ietf-tls-tls13-pkcs1/01/",
"NoCommonSignatureAlgorithms-TLS12-Fallback": "requires TLS_RSA_WITH_AES_128_GCM_SHA256",
-#if defined(POST_QUANTUM)
- "MLKEMKeyShareIncludedSecond": "we only include a share for the first configured group",
+#if defined(AWS_LC_RS)
"MLKEMKeyShareIncludedSecond-MLKEM1024": "we only include a share for the first configured group",
- "MLKEMKeyShareIncludedThird": "we only include a share for the first configured group",
+ "MLKEMKeyShareIncludedSecond-X25519MLKEM768": "we only include a share for the first configured group",
"MLKEMKeyShareIncludedThird-MLKEM1024": "we only include a share for the first configured group",
+ "MLKEMKeyShareIncludedThird-X25519MLKEM768": "we only include a share for the first configured group",
+ "MultiplePQGroups-MLKEM1024": "we only include a share for the first configured group",
+ "NotJustMLKEMKeyShare-MLKEM1024": "we only include a share for the first configured group",
+ "TwoMLKEMs": "we only include a share for the first configured group",
#else
"*MLKEM*": "not implemented",
#endif
-#if defined(AWS_LC_RS)
- "PostQuantumNotEnabledByDefaultInClients": "it is",
- "PostQuantumNotEnabledByDefaultForAServer": "it is",
+#ifndef AWS_LC_RS
+ "PostQuantumEnabledByDefaultForAServer": "*ring* has no ML-KEM",
+ "PostQuantumEnabledByDefaultInClients": "*ring* has no ML-KEM",
#endif
- "*Kyber*": "old draft, not implemented",
"ExtraClientEncryptedExtension-*": "we don't implement ALPS",
"Server-JDK11*": "workarounds for oracle engineering quality",
"Client-RejectJDK11DowngradeRandom": "workarounds for oracle engineering quality",
@@ -77,18 +94,20 @@
"BadRSAClientKeyExchange-*": "no rsa kem",
"SendClientVersion-RSA": "no rsa kem",
"Basic-Server-RSA-*": "no rsa kem",
+ "CertificateCipherMismatch-PSS": "no rsa kem",
"RSAKeyUsage-*": "no rsa kem",
"*-RSA_WITH_3DES_EDE_CBC_SHA-*": "no cbc suites",
"*_WITH_AES_128_CBC_*": "no cbc suites",
"*_WITH_AES_256_CBC_*": "no cbc suites",
"*-ECDSA_SHA1-*": "no ecdsa-sha1",
+ "*-Sign-ML-DSA-*": "TODO: no ML-DSA signing support",
+ "*-Sign-Negotiate-ML-DSA-*": "TODO: no ML-DSA signing support",
+ "*-SignDefault-ML-DSA-*": "TODO: no ML-DSA signing support",
"*-Sign-RSA_PKCS1_SHA1-*": "no sha1",
"*-SignDefault-RSA_PKCS1_SHA1-*": "no sha1",
"*-VerifyDefault-RSA_PKCS1_SHA1-*": "no sha1",
"VerifyPreferences-NoCommonAlgorithms": "we validate but don't actually implement -verify-prefs",
"VerifyPreferences-Enforced": "we validate but don't actually implement -verify-prefs",
- "*_P224_*": "no p224",
- "*-P-224-*": "no p224",
#ifdef RING
"*-ECDSA_P521_SHA512-*": "no p521 signatures/verification",
#endif
@@ -97,7 +116,6 @@
"LargeMessage-Reject": "not supported as a runtime option (cert size limit is compile-time constant)",
"DelegatedCredentials-*": "not implemented",
"NoCommonCurves": "nothing to fall back to",
- "ClientHelloPadding": "hello padding extension not implemented",
"Resume-Client-CipherMismatch": "tries to vary to unimplemented CBC-mode cs",
"*Auth-SHA1-Fallback*": "no sha1 support, so no meaningful need to assume client supports it",
"RSA-PSS-Large": "no support for 1024-bit RSA keys",
@@ -107,7 +125,7 @@
"*-RSA_WITH_AES_256_CBC_SHA-*": "no rsa kem",
"OmitExtensions-ClientHello-TLS12": "we require signature algorithms ext",
"EmptyExtensions-ClientHello-TLS12": "we require signature algorithms ext",
- "Resume-Server-OmitPSKsOnSecondClientHello": "not required by RFC",
+ "Resume-Server-CipherNotPreferred": "first connection requires an unimplemented CBC-mode cs (note the TLS1.3 version of this test passes)",
"FallbackSCSV*": "fallback countermeasure not yet implemented",
"RequireAnyClientCertificate-TLS12": "we don't send an alert in this case",
"ServerBogusVersion": "we ignore legacy_version if there's an extension",
@@ -125,7 +143,11 @@
"QUICTransportParams-*": "quic mode does not work over TLS1.3 framing -- do this in the shim?",
"QUICCompatibilityMode": "quic mode does not work over TLS1.3 framing -- do this in the shim?",
"PAKE-*": "no PAKE draft support",
+ "PSK-Client-*": "TODO: no external PSK support",
+ "PSK-Server-*": "TODO: no external PSK support",
"TrustAnchors-*": "no TrustAnchor draft support",
+ "TrustAnchorGroups-*": "no TrustAnchor draft support",
+ "ExtensionTrailingData-TrustAnchors-*": "no TrustAnchor draft support",
"TLS13-Client-*TicketFlags*": "no flags extension support (on tickets or elsewhere)",
"Ed25519DefaultDisable-NoAccept": "not implemented (ed25519 accepted by default)",
"Ed25519DefaultDisable-NoAdvertise": "not implemented (ed25519 advertised by default)",
@@ -140,9 +162,19 @@
"*-HintMismatch-*": "hints are a boringssl-specific feature",
#if defined(AWS_LC_RS) && defined(FIPS)
"Compliance-fips-202205-TLS-Client-ECDSA_P521_SHA512": "fips approved in aws-lc-rs",
+ "Compliance-fips-202205-TLS-Client-MLKEM": "fips pending in aws-lc-rs",
+ "Compliance-fips-202205-TLS-Client-X25519MLKEM768": "ml-kem fips pending in aws-lc-rs",
"Compliance-fips-202205-TLS-Server-ECDSA_P521_SHA512": "fips approved in aws-lc-rs",
+ "Compliance-fips-202205-TLS-Server-MLKEM": "fips pending in aws-lc-rs",
"Compliance-fips-202205-TLS-Client-Ed25519": "fips approved in aws-lc-rs",
"Compliance-fips-202205-TLS-Server-Ed25519": "fips approved in aws-lc-rs",
+ "Compliance-fips-202205-TLS-Server-X25519MLKEM768": "ml-kem fips pending in aws-lc-rs",
+ "Compliance-fips-202205-TLS-Client-ML-DSA-44": "ML-DSA postdates fips-202205 policy",
+ "Compliance-fips-202205-TLS-Client-ML-DSA-65": "ML-DSA postdates fips-202205 policy",
+ "Compliance-fips-202205-TLS-Client-ML-DSA-87": "ML-DSA postdates fips-202205 policy",
+ "Compliance-fips-202205-TLS-Server-ML-DSA-44": "ML-DSA postdates fips-202205 policy",
+ "Compliance-fips-202205-TLS-Server-ML-DSA-65": "ML-DSA postdates fips-202205 policy",
+ "Compliance-fips-202205-TLS-Server-ML-DSA-87": "ML-DSA postdates fips-202205 policy",
#endif
"*-QUIC-*" :"quic mode does not work over TLS1.3 framing -- do this in the shim?",
"QUIC-*": "quic mode does not work over TLS1.3 framing -- do this in the shim?",
@@ -163,7 +195,19 @@
"AppDataBeforeTLS13KeyChange": ":DECRYPTION_FAILED_OR_BAD_RECORD_MAC:",
"AppDataBeforeTLS13KeyChange-Empty": ":DECRYPTION_FAILED_OR_BAD_RECORD_MAC:",
"EmptyCertificateList": ":NO_CERTS:",
+ "Client-VerifyDefault-ML-DSA-44-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-VerifyDefault-ML-DSA-65-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-VerifyDefault-ML-DSA-87-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "ExtensionTrailingData-CertificateAuthorities-Client-TLS-TLS13": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-CertificateAuthorities-Server-TLS-TLS13": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-ServerName-Client-TLS-TLS12": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-ServerName-Client-TLS-TLS13": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-ServerName-Server-TLS-TLS12": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-ServerName-Server-TLS-TLS13": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-StatusRequest-Client-TLS-TLS12": ":BAD_HANDSHAKE_MSG:",
+ "ExtensionTrailingData-StatusRequest-Client-TLS-TLS13": ":BAD_HANDSHAKE_MSG:",
"SendInvalidRecordType": ":GARBAGE:",
+ "SendPostHandshakeChangeCipherSpec-TLS13": ":PEER_MISBEHAVIOUR:",
"NoSharedCipher": ":HANDSHAKE_FAILURE:",
"NoSharedCipher-TLS13": ":HANDSHAKE_FAILURE:",
"InvalidECDHPoint-Client": ":PEER_MISBEHAVIOUR:",
@@ -230,6 +274,27 @@
"TLS-TLS12-AES_256_GCM_SHA384-client": ":PEER_MISBEHAVIOUR:",
"SkipHelloRetryRequest-TLS13": ":PEER_MISBEHAVIOUR:",
"NoSupportedVersions": ":INCOMPATIBLE:",
+ "Client-Sign-ML-DSA-44-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-Sign-ML-DSA-65-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-Sign-ML-DSA-87-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-SignDefault-ML-DSA-44-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-SignDefault-ML-DSA-65-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-SignDefault-ML-DSA-87-TLS12": ":NO_COMMON_SIGNATURE_ALGORITHMS:",
+ "Client-Verify-ML-DSA-44-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-Verify-ML-DSA-65-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-Verify-ML-DSA-87-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-VerifyDefault-ML-DSA-44-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-VerifyDefault-ML-DSA-65-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Client-VerifyDefault-ML-DSA-87-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Server-Sign-ML-DSA-44-TLS12": ":INCOMPATIBLE:",
+ "Server-Sign-ML-DSA-65-TLS12": ":INCOMPATIBLE:",
+ "Server-Sign-ML-DSA-87-TLS12": ":INCOMPATIBLE:",
+ "Server-SignDefault-ML-DSA-44-TLS12": ":INCOMPATIBLE:",
+ "Server-SignDefault-ML-DSA-65-TLS12": ":INCOMPATIBLE:",
+ "Server-SignDefault-ML-DSA-87-TLS12": ":INCOMPATIBLE:",
+ "Server-VerifyDefault-ML-DSA-44-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Server-VerifyDefault-ML-DSA-65-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "Server-VerifyDefault-ML-DSA-87-TLS12": ":WRONG_SIGNATURE_TYPE:",
"Server-Sign-RSA_PKCS1_SHA256-TLS13": ":INCOMPATIBLE:",
"Server-Sign-RSA_PKCS1_SHA384-TLS13": ":INCOMPATIBLE:",
"Server-Sign-RSA_PKCS1_SHA512-TLS13": ":INCOMPATIBLE:",
@@ -274,6 +339,10 @@
"UnknownUnencryptedExtension-Client-TLS13": ":PEER_MISBEHAVIOUR:",
"UnexpectedUnencryptedExtension-Client-TLS13": ":PEER_MISBEHAVIOUR:",
"UnofferedExtension-Client-TLS13": ":PEER_MISBEHAVIOUR:",
+ "RejectPSSKeyType-Client-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "RejectPSSKeyType-Client-TLS13": ":WRONG_SIGNATURE_TYPE:",
+ "RejectPSSKeyType-Server-TLS12": ":WRONG_SIGNATURE_TYPE:",
+ "RejectPSSKeyType-Server-TLS13": ":WRONG_SIGNATURE_TYPE:",
"RenegotiationInfo-Forbidden-TLS13": ":PEER_MISBEHAVIOUR:",
"UnknownExtension-Client-TLS13": ":PEER_MISBEHAVIOUR:",
"RequestContextInHandshake-TLS13": ":BAD_HANDSHAKE_MSG:",
@@ -351,6 +420,8 @@
"GarbageCertificate-Server-TLS13": "remote error: bad certificate",
"GarbageCertificate-Client-TLS12": "remote error: bad certificate",
"GarbageCertificate-Client-TLS13": "remote error: bad certificate",
+ "MissingKeyShare-Server-TLS13": "remote error: handshake failure",
+ "NoSupportedCurves-TLS13": "remote error: handshake failure",
"Downgrade-TLS10-Client": "tls: no cipher suite supported by both client and server",
"Downgrade-TLS10-Server": "remote error: protocol version not supported",
"TrailingDataWithFinished-Client-TLS13": "local error: bad record MAC",
@@ -369,7 +440,13 @@
"CertificateSelection-Client-SignatureAlgorithm-MatchNone-TLS-TLS13": "",
"CertificateSelection-Client-SignatureAlgorithmECDSACurve-MatchNone-TLS-TLS13": "",
"CertificateSelection-Client-SignatureAlgorithmKeyPrefs-MatchNone-TLS-TLS12": "",
- "CertificateSelection-Client-SignatureAlgorithmKeyPrefs-MatchNone-TLS-TLS13": ""
+ "CertificateSelection-Client-SignatureAlgorithmKeyPrefs-MatchNone-TLS-TLS13": "",
+ "Client-Sign-ML-DSA-44-TLS12": "",
+ "Client-Sign-ML-DSA-65-TLS12": "",
+ "Client-Sign-ML-DSA-87-TLS12": "",
+ "Client-SignDefault-ML-DSA-44-TLS12": "",
+ "Client-SignDefault-ML-DSA-65-TLS12": "",
+ "Client-SignDefault-ML-DSA-87-TLS12": ""
},
"HalfRTTTickets": 0
}
diff --git a/bogo/fetch-and-build b/bogo/fetch-and-build
deleted file mode 100755
index 928e701199f..00000000000
--- a/bogo/fetch-and-build
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-mkdir -p bogo
-pushd bogo
-
-git init --initial-branch main
-git config core.sparsecheckout 1
-cat << EOF > .git/info/sparse-checkout
-go.mod
-go.sum
-ssl/test/runner
-util/testresult
-EOF
-
-# fix on a tested point of rustls-testing branch
-COMMIT=92b3d4e221b4b4690dc9c3f8ada7e92df843e987
-git fetch --depth=1 https://github.com/rustls/boringssl.git $COMMIT
-git checkout $COMMIT
-(cd ssl/test/runner && go test -c)
-
-popd
diff --git a/bogo/runme b/bogo/runme
index 795451494bb..351d4bcaef3 100755
--- a/bogo/runme
+++ b/bogo/runme
@@ -18,10 +18,6 @@ case ${BOGO_SHIM_PROVIDER:-aws-lc-rs} in
cpp -P -DAWS_LC_RS -DFIPS config.json.in > config.json
cargo run --features fips -- -print-rustls-provider
;;
- post-quantum)
- cpp -P -DAWS_LC_RS -DPOST_QUANTUM config.json.in > config.json
- cargo run --features post-quantum -- -print-rustls-provider
- ;;
existing)
;;
*)
@@ -30,11 +26,37 @@ case ${BOGO_SHIM_PROVIDER:-aws-lc-rs} in
;;
esac
-if [ ! -e bogo/ssl/test/runner/runner.test ] ; then
- ./fetch-and-build
+if [ ! -e bogo/.git ] ; then
+ mkdir -p bogo
+ pushd bogo
+
+ git init --initial-branch main
+ git config core.sparsecheckout 1
+ cat << EOF > .git/info/sparse-checkout
+go.mod
+go.sum
+ssl/test/runner
+util/testresult
+EOF
+
+ popd
cp -v keys/* bogo/
fi
+# fix on a tested point of rustls-testing branch
+COMMIT=9389a4af2c6c47a59ec39bfb51e4da2fe971d1bc
+changed=$([ "$(git -C bogo rev-parse HEAD)" != "$COMMIT" ] && echo true || echo false)
+if $changed ; then
+ pushd bogo
+ git fetch --depth=1 https://github.com/rustls/boringssl.git $COMMIT
+ git checkout $COMMIT
+ popd
+fi
+
+if $changed || [ ! -e bogo/ssl/test/runner/runner.test ] ; then
+ (cd bogo/ssl/test/runner && go test -c)
+fi
+
# Best effort on OS-X
case $OSTYPE in darwin*) set +e ;; esac
diff --git a/bogo/src/main.rs b/bogo/src/main.rs
index 20cc735ba3a..656e721b0ef 100644
--- a/bogo/src/main.rs
+++ b/bogo/src/main.rs
@@ -20,6 +20,7 @@
)]
use core::fmt::{Debug, Formatter};
+use core::sync::atomic::{AtomicUsize, Ordering};
use std::io::{self, Read, Write};
use std::sync::{Arc, Mutex};
use std::{env, net, process, thread, time};
@@ -36,7 +37,7 @@ use rustls::client::{
};
use rustls::crypto::aws_lc_rs::hpke;
use rustls::crypto::hpke::{Hpke, HpkePublicKey};
-use rustls::crypto::{CryptoProvider, aws_lc_rs, ring};
+use rustls::crypto::{CryptoProvider, WebPkiSupportedAlgorithms, aws_lc_rs, ring};
use rustls::internal::msgs::codec::{Codec, Reader};
use rustls::internal::msgs::handshake::EchConfigPayload;
use rustls::internal::msgs::persist::ServerSessionValue;
@@ -52,6 +53,15 @@ use rustls::{
PeerIncompatible, PeerMisbehaved, ProtocolVersion, RootCertStore, Side, SignatureAlgorithm,
SignatureScheme, SupportedProtocolVersion, client, compress, server, sign, version,
};
+use webpki::aws_lc_rs::{
+ ECDSA_P256_SHA256, ECDSA_P256_SHA384, ECDSA_P256_SHA512, ECDSA_P384_SHA256, ECDSA_P384_SHA384,
+ ECDSA_P384_SHA512, ECDSA_P521_SHA256, ECDSA_P521_SHA384, ECDSA_P521_SHA512, ED25519,
+ RSA_PKCS1_2048_8192_SHA256, RSA_PKCS1_2048_8192_SHA256_ABSENT_PARAMS,
+ RSA_PKCS1_2048_8192_SHA384, RSA_PKCS1_2048_8192_SHA384_ABSENT_PARAMS,
+ RSA_PKCS1_2048_8192_SHA512, RSA_PKCS1_2048_8192_SHA512_ABSENT_PARAMS,
+ RSA_PSS_2048_8192_SHA256_LEGACY_KEY, RSA_PSS_2048_8192_SHA384_LEGACY_KEY,
+ RSA_PSS_2048_8192_SHA512_LEGACY_KEY,
+};
static BOGO_NACK: i32 = 89;
@@ -93,6 +103,7 @@ struct Options {
max_version: Option,
server_ocsp_response: Vec,
groups: Option>,
+ server_supported_group_hint: Option,
export_keying_material: usize,
export_keying_material_label: String,
export_keying_material_context: String,
@@ -117,21 +128,36 @@ struct Options {
ech_config_list: Option>,
expect_ech_accept: bool,
expect_ech_retry_configs: Option>,
+ expect_no_ech_retry_configs: bool,
on_resume_ech_config_list: Option>,
on_resume_expect_ech_accept: bool,
on_initial_expect_ech_accept: bool,
enable_ech_grease: bool,
+ expect_ech_name_override: Option,
+ expect_no_ech_name_override: bool,
+ on_retry_expect_ech_name_override: Option,
send_key_update: bool,
expect_curve_id: Option,
on_initial_expect_curve_id: Option,
on_resume_expect_curve_id: Option,
wait_for_debugger: bool,
ocsp: OcspValidation,
+ verify_prefs: Option,
}
impl Options {
fn new() -> Self {
- let selected_provider = SelectedProvider::from_env();
+ let selected_provider = match env::var("BOGO_SHIM_PROVIDER")
+ .ok()
+ .as_deref()
+ {
+ None | Some("aws-lc-rs") => SelectedProvider::AwsLcRs,
+ #[cfg(feature = "fips")]
+ Some("aws-lc-rs-fips") => SelectedProvider::AwsLcRsFips,
+ Some("ring") => SelectedProvider::Ring,
+ Some(other) => panic!("unrecognised value for BOGO_SHIM_PROVIDER: {other:?}"),
+ };
+
Self {
port: 0,
shim_id: 0,
@@ -163,6 +189,7 @@ impl Options {
max_version: None,
server_ocsp_response: vec![],
groups: None,
+ server_supported_group_hint: None,
export_keying_material: 0,
export_keying_material_label: "".to_string(),
export_keying_material_context: "".to_string(),
@@ -187,17 +214,49 @@ impl Options {
ech_config_list: None,
expect_ech_accept: false,
expect_ech_retry_configs: None,
+ expect_no_ech_retry_configs: false,
on_resume_ech_config_list: None,
on_resume_expect_ech_accept: false,
on_initial_expect_ech_accept: false,
enable_ech_grease: false,
+ expect_ech_name_override: None,
+ expect_no_ech_name_override: false,
+ on_retry_expect_ech_name_override: None,
send_key_update: false,
expect_curve_id: None,
on_initial_expect_curve_id: None,
on_resume_expect_curve_id: None,
wait_for_debugger: false,
ocsp: OcspValidation::default(),
+ verify_prefs: None,
+ }
+ }
+
+ pub(crate) fn provider(&self) -> CryptoProvider {
+ let mut provider = self.provider.clone();
+
+ if let Some(groups) = &self.groups {
+ provider
+ .kx_groups
+ .retain(|kxg| groups.contains(&kxg.name()));
+ }
+
+ if !matches!(self.selected_provider, SelectedProvider::Ring)
+ && matches!(
+ self.verify_prefs,
+ Some(
+ SignatureScheme::ML_DSA_44
+ | SignatureScheme::ML_DSA_65
+ | SignatureScheme::ML_DSA_87
+ )
+ )
+ {
+ // ML-DSA is disabled by default, enable for preferred verification scheme
+ provider.signature_verification_algorithms =
+ aws_lc_rs::default_provider().signature_verification_algorithms;
}
+
+ provider
}
fn version_allowed(&self, vers: ProtocolVersion) -> bool {
@@ -214,6 +273,35 @@ impl Options {
self.support_tls12 && self.version_allowed(ProtocolVersion::TLSv1_2)
}
+ fn expected_server_names(&self) -> Vec> {
+ let mut names = vec![];
+
+ let name = match (
+ &self.expect_ech_name_override,
+ self.expect_no_ech_name_override,
+ ) {
+ (Some(override_name), _) => override_name,
+ (None, true) => &self.host_name,
+ (None, false) => return names,
+ };
+
+ names.push(
+ ServerName::try_from(name.as_str())
+ .expect("invalid expected server name")
+ .to_owned(),
+ );
+
+ if let Some(on_retry) = &self.on_retry_expect_ech_name_override {
+ names.push(
+ ServerName::try_from(on_retry.as_str())
+ .expect("invalid expected server name")
+ .to_owned(),
+ );
+ }
+
+ names
+ }
+
fn supported_versions(&self) -> Vec<&'static SupportedProtocolVersion> {
let mut versions = vec![];
@@ -280,37 +368,21 @@ enum SelectedProvider {
AwsLcRs,
#[cfg_attr(not(feature = "fips"), allow(dead_code))]
AwsLcRsFips,
- #[cfg_attr(not(feature = "post-quantum"), allow(dead_code))]
- PostQuantum,
Ring,
}
impl SelectedProvider {
- fn from_env() -> Self {
- match env::var("BOGO_SHIM_PROVIDER")
- .ok()
- .as_deref()
- {
- None | Some("aws-lc-rs") => Self::AwsLcRs,
- #[cfg(feature = "fips")]
- Some("aws-lc-rs-fips") => Self::AwsLcRsFips,
- #[cfg(feature = "post-quantum")]
- Some("post-quantum") => Self::PostQuantum,
- Some("ring") => Self::Ring,
- Some(other) => panic!("unrecognised value for BOGO_SHIM_PROVIDER: {other:?}"),
- }
- }
-
fn provider(&self) -> CryptoProvider {
match self {
- Self::AwsLcRs | Self::AwsLcRsFips | Self::PostQuantum => {
+ Self::AwsLcRs | Self::AwsLcRsFips => {
// ensure all suites and kx groups are included (even in fips builds)
// as non-fips test cases require them. runner activates fips mode via -fips-202205 option
// this includes rustls-post-quantum, which just returns an altered
// version of `aws_lc_rs::default_provider()`
CryptoProvider {
- kx_groups: aws_lc_rs::DEFAULT_KX_GROUPS.to_vec(),
+ kx_groups: aws_lc_rs::ALL_KX_GROUPS.to_vec(),
cipher_suites: aws_lc_rs::ALL_CIPHER_SUITES.to_vec(),
+ signature_verification_algorithms: SUPPORTED_SIG_ALGS,
..aws_lc_rs::default_provider()
}
}
@@ -321,21 +393,84 @@ impl SelectedProvider {
fn ticketer(&self) -> Arc {
match self {
- Self::AwsLcRs | Self::AwsLcRsFips | Self::PostQuantum => {
- aws_lc_rs::Ticketer::new().unwrap()
- }
+ Self::AwsLcRs | Self::AwsLcRsFips => aws_lc_rs::Ticketer::new().unwrap(),
Self::Ring => ring::Ticketer::new().unwrap(),
}
}
fn supports_ech(&self) -> bool {
match *self {
- Self::AwsLcRs | Self::AwsLcRsFips | Self::PostQuantum => true,
+ Self::AwsLcRs | Self::AwsLcRsFips => true,
Self::Ring => false,
}
}
}
+// aws-lc-rs signature algorithms, with ML-DSA disabled
+pub(crate) static SUPPORTED_SIG_ALGS: WebPkiSupportedAlgorithms = WebPkiSupportedAlgorithms {
+ all: &[
+ ECDSA_P256_SHA256,
+ ECDSA_P256_SHA384,
+ ECDSA_P256_SHA512,
+ ECDSA_P384_SHA256,
+ ECDSA_P384_SHA384,
+ ECDSA_P384_SHA512,
+ ECDSA_P521_SHA256,
+ ECDSA_P521_SHA384,
+ ECDSA_P521_SHA512,
+ ED25519,
+ RSA_PSS_2048_8192_SHA256_LEGACY_KEY,
+ RSA_PSS_2048_8192_SHA384_LEGACY_KEY,
+ RSA_PSS_2048_8192_SHA512_LEGACY_KEY,
+ RSA_PKCS1_2048_8192_SHA256,
+ RSA_PKCS1_2048_8192_SHA384,
+ RSA_PKCS1_2048_8192_SHA512,
+ RSA_PKCS1_2048_8192_SHA256_ABSENT_PARAMS,
+ RSA_PKCS1_2048_8192_SHA384_ABSENT_PARAMS,
+ RSA_PKCS1_2048_8192_SHA512_ABSENT_PARAMS,
+ ],
+ mapping: &[
+ // Note: for TLS1.2 the curve is not fixed by SignatureScheme. For TLS1.3 it is.
+ (
+ SignatureScheme::ECDSA_NISTP384_SHA384,
+ &[ECDSA_P384_SHA384, ECDSA_P256_SHA384, ECDSA_P521_SHA384],
+ ),
+ (
+ SignatureScheme::ECDSA_NISTP256_SHA256,
+ &[ECDSA_P256_SHA256, ECDSA_P384_SHA256, ECDSA_P521_SHA256],
+ ),
+ (
+ SignatureScheme::ECDSA_NISTP521_SHA512,
+ &[ECDSA_P521_SHA512, ECDSA_P384_SHA512, ECDSA_P256_SHA512],
+ ),
+ (SignatureScheme::ED25519, &[ED25519]),
+ (
+ SignatureScheme::RSA_PSS_SHA512,
+ &[RSA_PSS_2048_8192_SHA512_LEGACY_KEY],
+ ),
+ (
+ SignatureScheme::RSA_PSS_SHA384,
+ &[RSA_PSS_2048_8192_SHA384_LEGACY_KEY],
+ ),
+ (
+ SignatureScheme::RSA_PSS_SHA256,
+ &[RSA_PSS_2048_8192_SHA256_LEGACY_KEY],
+ ),
+ (
+ SignatureScheme::RSA_PKCS1_SHA512,
+ &[RSA_PKCS1_2048_8192_SHA512],
+ ),
+ (
+ SignatureScheme::RSA_PKCS1_SHA384,
+ &[RSA_PKCS1_2048_8192_SHA384],
+ ),
+ (
+ SignatureScheme::RSA_PKCS1_SHA256,
+ &[RSA_PKCS1_2048_8192_SHA256],
+ ),
+ ],
+};
+
fn load_root_certs(filename: &str) -> Arc {
let mut roots = RootCertStore::empty();
@@ -392,15 +527,14 @@ impl DummyClientAuth {
trusted_cert_file: &str,
mandatory: bool,
root_hint_subjects: Vec,
+ provider: Arc,
) -> Self {
Self {
mandatory,
root_hint_subjects,
parent: WebPkiClientVerifier::builder_with_provider(
load_root_certs(trusted_cert_file),
- SelectedProvider::from_env()
- .provider()
- .into(),
+ provider,
)
.build()
.unwrap(),
@@ -459,20 +593,27 @@ impl ClientCertVerifier for DummyClientAuth {
struct DummyServerAuth {
parent: Arc,
ocsp: OcspValidation,
+ expect_server_names: Vec>,
+ server_name_index: AtomicUsize,
}
impl DummyServerAuth {
- fn new(trusted_cert_file: &str, ocsp: OcspValidation) -> Self {
+ fn new(
+ trusted_cert_file: &str,
+ ocsp: OcspValidation,
+ expect_server_names: Vec>,
+ provider: Arc,
+ ) -> Self {
Self {
parent: WebPkiServerVerifier::builder_with_provider(
load_root_certs(trusted_cert_file),
- SelectedProvider::from_env()
- .provider()
- .into(),
+ provider,
)
.build()
.unwrap(),
ocsp,
+ expect_server_names,
+ server_name_index: AtomicUsize::new(0),
}
}
}
@@ -482,10 +623,16 @@ impl ServerCertVerifier for DummyServerAuth {
&self,
_end_entity: &CertificateDer<'_>,
_certs: &[CertificateDer<'_>],
- _hostname: &ServerName<'_>,
+ hostname: &ServerName<'_>,
_ocsp: &[u8],
_now: UnixTime,
) -> Result {
+ if !self.expect_server_names.is_empty() {
+ let expect_server_name = &self.expect_server_names[self
+ .server_name_index
+ .fetch_add(1, Ordering::SeqCst)];
+ assert_eq!(hostname, expect_server_name);
+ }
if let OcspValidation::Reject = self.ocsp {
return Err(CertificateError::InvalidOcspResponse.into());
}
@@ -591,11 +738,7 @@ impl client::ResolvesClientCert for MultipleClientCredentialResolver {
for sig_scheme in sig_schemes.iter().copied() {
for (i, cert) in self.additional.iter().enumerate() {
// if the server sends any issuer hints, respect them
- if cert.must_match_issuer
- && !root_hint_subjects
- .iter()
- .any(|dn| *dn == cert.issuer_dn.as_ref())
- {
+ if cert.must_match_issuer && !cert.any_issuer_matches_hints(root_hint_subjects) {
continue;
}
@@ -647,14 +790,17 @@ impl client::ResolvesClientCert for MultipleClientCredentialResolver {
#[derive(Debug)]
struct ClientCert {
certkey: Arc,
- issuer_dn: DistinguishedName,
+ issuer_names: Vec,
must_match_issuer: bool,
}
impl ClientCert {
fn new(mut certkey: sign::CertifiedKey, meta: &Credential) -> Self {
- let parsed_cert = webpki::EndEntityCert::try_from(certkey.cert.last().unwrap()).unwrap();
- let issuer_dn = DistinguishedName::in_sequence(parsed_cert.issuer());
+ let mut issuer_names = Vec::new();
+ for cert in &certkey.cert {
+ let parsed_cert = webpki::EndEntityCert::try_from(cert).unwrap();
+ issuer_names.push(DistinguishedName::in_sequence(parsed_cert.issuer()));
+ }
if let Some(scheme) = meta.use_signing_scheme {
certkey.key = Arc::new(FixedSignatureSchemeSigningKey {
@@ -665,10 +811,18 @@ impl ClientCert {
Self {
certkey: Arc::new(certkey),
- issuer_dn,
+ issuer_names,
must_match_issuer: meta.must_match_issuer,
}
}
+
+ fn any_issuer_matches_hints(&self, hints: &[&[u8]]) -> bool {
+ hints.iter().any(|dn| {
+ self.issuer_names
+ .iter()
+ .any(|issuer| *dn == issuer.as_ref())
+ })
+ }
}
fn lookup_scheme(scheme: u16) -> SignatureScheme {
@@ -683,6 +837,9 @@ fn lookup_scheme(scheme: u16) -> SignatureScheme {
0x0805 => SignatureScheme::RSA_PSS_SHA384,
0x0806 => SignatureScheme::RSA_PSS_SHA512,
0x0807 => SignatureScheme::ED25519,
+ 0x0904 => SignatureScheme::ML_DSA_44,
+ 0x0905 => SignatureScheme::ML_DSA_65,
+ 0x0906 => SignatureScheme::ML_DSA_87,
// TODO: add support for Ed448
// 0x0808 => SignatureScheme::ED448,
_ => {
@@ -752,12 +909,15 @@ impl server::StoresServerSessions for ServerCacheWithResumptionDelay {
}
fn make_server_cfg(opts: &Options, key_log: &Arc) -> Arc {
+ let provider = Arc::new(opts.provider());
+
let client_auth =
if opts.verify_peer || opts.offer_no_client_cas || opts.require_any_client_cert {
Arc::new(DummyClientAuth::new(
&opts.trusted_cert_file,
opts.require_any_client_cert,
opts.root_hint_subjects.clone(),
+ provider.clone(),
))
} else {
WebPkiClientVerifier::no_client_auth()
@@ -770,15 +930,7 @@ fn make_server_cfg(opts: &Options, key_log: &Arc) -> Arc) -> Arc,
storage: Arc,
}
-impl ClientCacheWithoutKxHints {
- fn new(delay: u32) -> Arc {
+impl ClientCacheWithSpecificKxHints {
+ fn new(delay: u32, kx_hint: Option) -> Arc {
Arc::new(Self {
delay,
+ kx_hint,
storage: Arc::new(client::ClientSessionMemoryCache::new(32)),
})
}
}
-impl client::ClientSessionStore for ClientCacheWithoutKxHints {
+impl client::ClientSessionStore for ClientCacheWithSpecificKxHints {
fn set_kx_hint(&self, _: ServerName<'static>, _: NamedGroup) {}
fn kx_hint(&self, _: &ServerName<'_>) -> Option {
- None
+ self.kx_hint
}
fn set_tls12_session(
@@ -904,7 +1058,7 @@ impl client::ClientSessionStore for ClientCacheWithoutKxHints {
}
}
-impl Debug for ClientCacheWithoutKxHints {
+impl Debug for ClientCacheWithSpecificKxHints {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
// Note: we omit self.storage here as it may contain sensitive data.
f.debug_struct("ClientCacheWithoutKxHints")
@@ -914,15 +1068,7 @@ impl Debug for ClientCacheWithoutKxHints {
}
fn make_client_cfg(opts: &Options, key_log: &Arc) -> Arc {
- let mut provider = opts.provider.clone();
-
- if let Some(groups) = &opts.groups {
- provider
- .kx_groups
- .retain(|kxg| groups.contains(&kxg.name()));
- }
-
- let provider = Arc::new(provider);
+ let provider = Arc::new(opts.provider());
let cfg = ClientConfig::builder_with_provider(provider.clone());
let cfg = if opts.selected_provider.supports_ech() {
@@ -955,6 +1101,8 @@ fn make_client_cfg(opts: &Options, key_log: &Arc) -> Arc) -> Arc cfg.with_no_client_auth(),
};
- cfg.resumption = Resumption::store(ClientCacheWithoutKxHints::new(opts.resumption_delay))
- .tls12_resumption(match opts.tickets {
- true => Tls12Resumption::SessionIdOrTickets,
- false => Tls12Resumption::SessionIdOnly,
- });
+ cfg.resumption = Resumption::store(ClientCacheWithSpecificKxHints::new(
+ opts.resumption_delay,
+ opts.server_supported_group_hint,
+ ))
+ .tls12_resumption(match opts.tickets {
+ true => Tls12Resumption::SessionIdOrTickets,
+ false => Tls12Resumption::SessionIdOnly,
+ });
cfg.enable_sni = opts.use_sni;
cfg.max_fragment_size = opts.max_fragment;
cfg.require_ems = opts.require_ems;
@@ -1098,9 +1249,6 @@ fn handle_err(opts: &Options, err: Error) -> ! {
Error::InvalidMessage(InvalidMessage::PreSharedKeyIsNotFinalExtension) => {
quit(":PRE_SHARED_KEY_MUST_BE_LAST:")
}
- Error::DecryptError if opts.ech_config_list.is_some() => {
- quit(":INCONSISTENT_ECH_NEGOTIATION:")
- }
Error::DecryptError => quit(":DECRYPTION_FAILED_OR_BAD_RECORD_MAC:"),
Error::NoApplicationProtocol => quit(":NO_APPLICATION_PROTOCOL:"),
Error::PeerIncompatible(
@@ -1109,6 +1257,9 @@ fn handle_err(opts: &Options, err: Error) -> ! {
Error::PeerIncompatible(PeerIncompatible::ServerRejectedEncryptedClientHello(
_retry_configs,
)) => {
+ if opts.expect_no_ech_retry_configs {
+ assert_eq!(_retry_configs, None);
+ }
if let Some(expected_configs) = &opts.expect_ech_retry_configs {
let expected_configs =
Vec::::read(&mut Reader::init(expected_configs)).unwrap();
@@ -1117,9 +1268,10 @@ fn handle_err(opts: &Options, err: Error) -> ! {
quit(":ECH_REJECTED:")
}
Error::PeerIncompatible(_) => quit(":INCOMPATIBLE:"),
- Error::PeerMisbehaved(PeerMisbehaved::MissingPskModesExtension) => {
- quit(":MISSING_EXTENSION:")
- }
+ Error::PeerMisbehaved(
+ PeerMisbehaved::MissingPskExtensionInSecondClientHello
+ | PeerMisbehaved::MissingPskModesExtension,
+ ) => quit(":MISSING_EXTENSION:"),
Error::PeerMisbehaved(PeerMisbehaved::TooMuchEarlyDataReceived) => {
quit(":TOO_MUCH_READ_EARLY_DATA:")
}
@@ -1151,6 +1303,9 @@ fn handle_err(opts: &Options, err: Error) -> ! {
Error::PeerMisbehaved(PeerMisbehaved::TooManyEmptyFragments) => {
quit(":TOO_MANY_EMPTY_FRAGMENTS:")
}
+ Error::PeerMisbehaved(PeerMisbehaved::EchAcceptanceVariedAfterRetry) => {
+ quit(":INCONSISTENT_ECH_NEGOTIATION:")
+ }
Error::PeerMisbehaved(PeerMisbehaved::IllegalHelloRetryRequestWithInvalidEch)
| Error::PeerMisbehaved(PeerMisbehaved::UnsolicitedEchExtension) => {
quit(":UNEXPECTED_EXTENSION:")
@@ -1226,7 +1381,12 @@ const MAX_MESSAGE_SIZE: usize = 0xffff + 5;
fn after_read(opts: &Options, sess: &mut Connection, conn: &mut net::TcpStream) {
if let Err(err) = sess.process_new_packets() {
- flush(sess, conn); /* send any alerts before exiting */
+ // Send any alerts before exiting, but don't swallow `err` if we can't.
+ while sess.wants_write() {
+ if sess.write_tls(conn).is_err() {
+ break;
+ }
+ }
orderly_close(conn);
handle_err(opts, err);
}
@@ -1557,7 +1717,9 @@ pub fn main() {
opts.credentials.last_mut().key_file = args.remove(0);
}
"-new-x509-credential" => {
- opts.credentials.additional.push(Credential::default());
+ opts.credentials
+ .additional
+ .push(Credential::default());
}
"-expect-selected-credential" => {
opts.credentials.expect_selected = args.remove(0).parse::().ok();
@@ -1608,68 +1770,74 @@ pub fn main() {
}
"-signing-prefs" => {
let alg = args.remove(0).parse::().unwrap();
- opts.credentials.last_mut().use_signing_scheme = Some(alg);
+ opts.credentials
+ .last_mut()
+ .use_signing_scheme = Some(alg);
}
"-must-match-issuer" => {
- opts.credentials.last_mut().must_match_issuer = true;
+ opts.credentials
+ .last_mut()
+ .must_match_issuer = true;
}
- "-use-client-ca-list" => {
- match args.remove(0).as_ref() {
- "" | "" => {
- opts.root_hint_subjects = vec![];
- }
- list => {
- opts.root_hint_subjects = list.split(',')
- .map(|entry| DistinguishedName::from(decode_hex(entry)))
- .collect();
- }
+ "-use-client-ca-list" => match args.remove(0).as_ref() {
+ "" | "" => {
+ opts.root_hint_subjects = vec![];
}
- }
+ list => {
+ opts.root_hint_subjects = list
+ .split(',')
+ .map(|entry| DistinguishedName::from(decode_hex(entry)))
+ .collect();
+ }
+ },
"-verify-prefs" => {
- lookup_scheme(args.remove(0).parse::().unwrap());
+ opts.verify_prefs = Some(lookup_scheme(args.remove(0).parse::().unwrap()));
}
"-expect-curve-id" => {
- opts.expect_curve_id = Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
+ opts.expect_curve_id =
+ Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
}
"-on-initial-expect-curve-id" => {
- opts.on_initial_expect_curve_id = Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
+ opts.on_initial_expect_curve_id =
+ Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
}
"-on-resume-expect-curve-id" => {
- opts.on_resume_expect_curve_id = Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
- }
- "-max-cert-list" |
- "-expect-peer-signature-algorithm" |
- "-expect-peer-verify-pref" |
- "-expect-advertised-alpn" |
- "-expect-alpn" |
- "-on-initial-expect-alpn" |
- "-on-resume-expect-alpn" |
- "-on-retry-expect-alpn" |
- "-expect-server-name" |
- "-expect-ocsp-response" |
- "-expect-signed-cert-timestamps" |
- "-expect-certificate-types" |
- "-expect-client-ca-list" |
- "-on-retry-expect-early-data-reason" |
- "-on-resume-expect-early-data-reason" |
- "-on-initial-expect-early-data-reason" |
- "-on-initial-expect-cipher" |
- "-on-resume-expect-cipher" |
- "-on-retry-expect-cipher" |
- "-expect-ticket-age-skew" |
- "-handshaker-path" |
- "-application-settings" |
- "-expect-msg-callback" => {
+ opts.on_resume_expect_curve_id =
+ Some(NamedGroup::from(args.remove(0).parse::().unwrap()));
+ }
+ "-max-cert-list"
+ | "-expect-peer-signature-algorithm"
+ | "-expect-peer-verify-pref"
+ | "-expect-advertised-alpn"
+ | "-expect-alpn"
+ | "-on-initial-expect-alpn"
+ | "-on-resume-expect-alpn"
+ | "-on-retry-expect-alpn"
+ | "-expect-server-name"
+ | "-expect-ocsp-response"
+ | "-expect-signed-cert-timestamps"
+ | "-expect-certificate-types"
+ | "-expect-client-ca-list"
+ | "-on-retry-expect-early-data-reason"
+ | "-on-resume-expect-early-data-reason"
+ | "-on-initial-expect-early-data-reason"
+ | "-on-initial-expect-cipher"
+ | "-on-resume-expect-cipher"
+ | "-on-retry-expect-cipher"
+ | "-expect-ticket-age-skew"
+ | "-handshaker-path"
+ | "-application-settings"
+ | "-expect-msg-callback" => {
println!("not checking {} {}; NYI", arg, args.remove(0));
}
- "-expect-secure-renegotiation" |
- "-expect-no-session-id" |
- "-enable-ed25519" |
- "-on-resume-expect-no-offer-early-data" |
- "-expect-tls13-downgrade" |
- "-enable-signed-cert-timestamps" |
- "-expect-session-id" => {
+ "-expect-secure-renegotiation"
+ | "-expect-no-session-id"
+ | "-enable-ed25519"
+ | "-on-resume-expect-no-offer-early-data"
+ | "-expect-tls13-downgrade"
+ | "-enable-signed-cert-timestamps"
+ | "-expect-session-id" => {
println!("not checking {arg}; NYI");
}
@@ -1685,7 +1853,7 @@ pub fn main() {
"-expect-session-miss" => {
opts.expect_handshake_kind_resumed = Some(vec![
HandshakeKind::Full,
- HandshakeKind::FullWithHelloRetryRequest
+ HandshakeKind::FullWithHelloRetryRequest,
]);
}
"-export-keying-material" => {
@@ -1704,16 +1872,19 @@ pub fn main() {
opts.export_traffic_secrets = true;
}
"-quic-transport-params" => {
- opts.quic_transport_params = BASE64_STANDARD.decode(args.remove(0).as_bytes())
+ opts.quic_transport_params = BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
.expect("invalid base64");
}
"-expect-quic-transport-params" => {
- opts.expect_quic_transport_params = BASE64_STANDARD.decode(args.remove(0).as_bytes())
+ opts.expect_quic_transport_params = BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
.expect("invalid base64");
}
"-ocsp-response" => {
- opts.server_ocsp_response = BASE64_STANDARD.decode(args.remove(0).as_bytes())
+ opts.server_ocsp_response = BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
.expect("invalid base64");
}
"-select-alpn" => {
@@ -1763,25 +1934,24 @@ pub fn main() {
opts.only_write_one_byte_after_handshake_on_resume = true;
}
"-on-resume-early-write-after-message" => {
- opts.queue_early_data_after_received_messages= match args.remove(0).parse::().unwrap() {
- // estimate where these messages appear in the server's first flight.
- 2 => vec![5 + 128 + 5 + 32],
- 8 => vec![5 + 128 + 5 + 32, 5 + 64],
- _ => {
- panic!("unhandled -on-resume-early-write-after-message");
- }
- };
+ opts.queue_early_data_after_received_messages =
+ match args.remove(0).parse::().unwrap() {
+ // estimate where these messages appear in the server's first flight.
+ 2 => vec![5 + 128 + 5 + 32],
+ 8 => vec![5 + 128 + 5 + 32, 5 + 64],
+ _ => {
+ panic!("unhandled -on-resume-early-write-after-message");
+ }
+ };
opts.queue_data_on_resume = true;
}
"-expect-ticket-supports-early-data" => {
opts.expect_ticket_supports_early_data = true;
}
- "-expect-accept-early-data" |
- "-on-resume-expect-accept-early-data" => {
+ "-expect-accept-early-data" | "-on-resume-expect-accept-early-data" => {
opts.expect_accept_early_data = true;
}
- "-expect-early-data-reason" |
- "-on-resume-expect-reject-early-data-reason" => {
+ "-expect-early-data-reason" | "-on-resume-expect-reject-early-data-reason" => {
let reason = args.remove(0);
match reason.as_str() {
"disabled" | "protocol_version" => {
@@ -1793,8 +1963,7 @@ pub fn main() {
}
}
}
- "-expect-reject-early-data" |
- "-on-resume-expect-reject-early-data" => {
+ "-expect-reject-early-data" | "-on-resume-expect-reject-early-data" => {
opts.expect_reject_early_data = true;
}
"-expect-version" => {
@@ -1802,13 +1971,13 @@ pub fn main() {
}
"-curves" => {
let group = NamedGroup::from(args.remove(0).parse::().unwrap());
- opts.groups.get_or_insert(Vec::new()).push(group);
-
- // if X25519MLKEM768 is requested, insert it from rustls_post_quantum
- #[cfg(feature = "post-quantum")]
- if group == rustls_post_quantum::X25519MLKEM768.name() && opts.selected_provider == SelectedProvider::PostQuantum {
- opts.provider.kx_groups.insert(0, rustls_post_quantum::X25519MLKEM768);
- }
+ opts.groups
+ .get_or_insert(Vec::new())
+ .push(group);
+ }
+ "-server-supported-groups-hint" => {
+ let group = NamedGroup::from(args.remove(0).parse::().unwrap());
+ opts.server_supported_group_hint = Some(group);
}
"-resumption-delay" => {
opts.resumption_delay = args.remove(0).parse::().unwrap();
@@ -1821,7 +1990,8 @@ pub fn main() {
opts.install_cert_compression_algs = CompressionAlgs::All;
}
"-install-one-cert-compression-alg" => {
- opts.install_cert_compression_algs = CompressionAlgs::One(args.remove(0).parse::().unwrap());
+ opts.install_cert_compression_algs =
+ CompressionAlgs::One(args.remove(0).parse::().unwrap());
}
#[cfg(feature = "fips")]
"-fips-202205" if opts.selected_provider == SelectedProvider::AwsLcRsFips => {
@@ -1832,33 +2002,59 @@ pub fn main() {
process::exit(BOGO_NACK);
}
"-ech-config-list" => {
- opts.ech_config_list = Some(BASE64_STANDARD.decode(args.remove(0).as_bytes())
- .expect("invalid ECH config base64").into());
+ opts.ech_config_list = Some(
+ BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
+ .expect("invalid ECH config base64")
+ .into(),
+ );
}
"-expect-ech-accept" => {
opts.expect_ech_accept = true;
}
"-expect-ech-retry-configs" => {
- opts.expect_ech_retry_configs = Some(BASE64_STANDARD.decode(args.remove(0).as_bytes())
- .expect("invalid ECH config base64").into());
+ opts.expect_ech_retry_configs = Some(
+ BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
+ .expect("invalid ECH config base64")
+ .into(),
+ );
}
"-on-resume-ech-config-list" => {
- opts.on_resume_ech_config_list = Some(BASE64_STANDARD.decode(args.remove(0).as_bytes())
- .expect("invalid on resume ECH config base64").into());
+ opts.on_resume_ech_config_list = Some(
+ BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
+ .expect("invalid on resume ECH config base64")
+ .into(),
+ );
}
"-on-resume-expect-ech-accept" => {
opts.on_resume_expect_ech_accept = true;
}
"-expect-no-ech-retry-configs" => {
opts.expect_ech_retry_configs = None;
+ opts.expect_no_ech_retry_configs = true;
}
"-on-initial-expect-ech-accept" => {
opts.on_initial_expect_ech_accept = true;
}
"-on-retry-expect-ech-retry-configs" => {
// Note: we treat this the same as -expect-ech-retry-configs
- opts.expect_ech_retry_configs = Some(BASE64_STANDARD.decode(args.remove(0).as_bytes())
- .expect("invalid retry ECH config base64").into());
+ opts.expect_ech_retry_configs = Some(
+ BASE64_STANDARD
+ .decode(args.remove(0).as_bytes())
+ .expect("invalid retry ECH config base64")
+ .into(),
+ );
+ }
+ "-expect-ech-name-override" => {
+ opts.expect_ech_name_override = Some(args.remove(0));
+ }
+ "-expect-no-ech-name-override" => {
+ opts.expect_no_ech_name_override = true;
+ }
+ "-on-retry-expect-ech-name-override" => {
+ opts.on_retry_expect_ech_name_override = Some(args.remove(0));
}
"-enable-ech-grease" => {
opts.enable_ech_grease = true;
@@ -1881,82 +2077,90 @@ pub fn main() {
}
// defaults:
- "-enable-all-curves" |
- "-renegotiate-ignore" |
- "-no-tls11" |
- "-no-tls1" |
- "-no-ssl3" |
- "-handoff" |
- "-ipv6" |
- "-decline-alpn" |
- "-permute-extensions" |
- "-expect-no-session" |
- "-expect-ticket-renewal" |
- "-enable-ocsp-stapling" |
- "-use-ocsp-callback" |
- "-forbid-renegotiation-after-handshake" |
- // internal openssl details:
- "-async" |
- "-implicit-handshake" |
- "-use-old-client-cert-callback" |
- "-use-early-callback" => {}
+ "-enable-all-curves"
+ | "-renegotiate-ignore"
+ | "-no-tls11"
+ | "-no-tls1"
+ | "-no-ssl3"
+ | "-handoff"
+ | "-ipv6"
+ | "-no-legacy-server-connect"
+ | "-decline-alpn"
+ | "-permute-extensions"
+ | "-expect-no-session"
+ | "-on-retry-expect-no-session"
+ | "-expect-ticket-renewal"
+ | "-enable-ocsp-stapling"
+ | "-use-ocsp-callback"
+ | "-forbid-renegotiation-after-handshake"
+ | "-async"
+ | "-implicit-handshake"
+ | "-use-old-client-cert-callback"
+ | "-use-early-callback"
+ | "-use-custom-verify-callback"
+ | "-reverify-on-resume"
+ | "-on-resume-expect-no-ech-name-override" => {}
// Not implemented things
- "-dtls" |
- "-cipher" |
- "-psk" |
- "-renegotiate-freely" |
- "-false-start" |
- "-fallback-scsv" |
- "-fail-early-callback" |
- "-fail-cert-callback" |
- "-install-ddos-callback" |
- "-advertise-npn" |
- "-advertise-empty-npn" |
- "-verify-fail" |
- "-expect-channel-id" |
- "-send-channel-id" |
- "-select-next-proto" |
- "-select-empty-next-proto" |
- "-expect-verify-result" |
- "-send-alert" |
- "-digest-prefs" |
- "-use-exporter-between-reads" |
- "-ticket-key" |
- "-tls-unique" |
- "-enable-server-custom-extension" |
- "-enable-client-custom-extension" |
- "-expect-dhe-group-size" |
- "-use-ticket-callback" |
- "-enable-grease" |
- "-enable-channel-id" |
- "-expect-early-data-info" |
- "-expect-cipher-aes" |
- "-retain-only-sha256-client-cert-initial" |
- "-expect-draft-downgrade" |
- "-allow-unknown-alpn-protos" |
- "-on-initial-tls13-variant" |
- "-on-resume-export-early-keying-material" |
- "-on-resume-enable-early-data" |
- "-export-early-keying-material" |
- "-handshake-twice" |
- "-on-resume-verify-fail" |
- "-reverify-on-resume" |
- "-no-op-extra-handshake" |
- "-expect-peer-cert-file" |
- "-no-rsa-pss-rsae-certs" |
- "-ignore-tls13-downgrade" |
- "-allow-hint-mismatch" |
- "-wpa-202304" |
- "-cnsa-202407" |
- "-srtp-profiles" |
- "-use-ticket-aead-callback" |
- "-signed-cert-timestamps" |
- "-on-initial-expect-peer-cert-file" |
- "-resumption-across-names-enabled" |
- "-expect-resumable-across-names" |
- "-expect-not-resumable-across-names" |
- "-use-custom-verify-callback" => {
+ "-dtls"
+ | "-cipher"
+ | "-psk"
+ | "-renegotiate-freely"
+ | "-false-start"
+ | "-fallback-scsv"
+ | "-fail-early-callback"
+ | "-fail-cert-callback"
+ | "-install-ddos-callback"
+ | "-advertise-npn"
+ | "-advertise-empty-npn"
+ | "-verify-fail"
+ | "-expect-channel-id"
+ | "-send-channel-id"
+ | "-select-next-proto"
+ | "-select-empty-next-proto"
+ | "-expect-verify-result"
+ | "-send-alert"
+ | "-digest-prefs"
+ | "-use-exporter-between-reads"
+ | "-ticket-key"
+ | "-tls-unique"
+ | "-enable-server-custom-extension"
+ | "-enable-client-custom-extension"
+ | "-expect-dhe-group-size"
+ | "-use-ticket-callback"
+ | "-enable-grease"
+ | "-enable-channel-id"
+ | "-expect-early-data-info"
+ | "-expect-cipher-aes"
+ | "-retain-only-sha256-client-cert-initial"
+ | "-expect-draft-downgrade"
+ | "-allow-unknown-alpn-protos"
+ | "-on-initial-tls13-variant"
+ | "-on-resume-export-early-keying-material"
+ | "-on-resume-enable-early-data"
+ | "-export-early-keying-material"
+ | "-handshake-twice"
+ | "-on-resume-verify-fail"
+ | "-on-retry-verify-fail"
+ | "-key-shares"
+ | "-no-key-shares"
+ | "-no-server-name-ack"
+ | "-no-op-extra-handshake"
+ | "-expect-peer-cert-file"
+ | "-no-rsa-pss-rsae-certs"
+ | "-ignore-tls13-downgrade"
+ | "-allow-hint-mismatch"
+ | "-wpa-202304"
+ | "-cnsa-202407"
+ | "-cnsa1-202603"
+ | "-cnsa2-202603"
+ | "-srtp-profiles"
+ | "-use-ticket-aead-callback"
+ | "-signed-cert-timestamps"
+ | "-on-initial-expect-peer-cert-file"
+ | "-resumption-across-names-enabled"
+ | "-expect-resumable-across-names"
+ | "-expect-not-resumable-across-names" => {
println!("NYI option {arg:?}");
process::exit(BOGO_NACK);
}
diff --git a/ci-bench/Cargo.toml b/ci-bench/Cargo.toml
index 63ae7d71236..446c77685a2 100644
--- a/ci-bench/Cargo.toml
+++ b/ci-bench/Cargo.toml
@@ -14,7 +14,7 @@ clap = { workspace = true }
itertools = { workspace = true }
rayon = { workspace = true }
rustc-hash = { workspace = true }
-rustls = { path = "../rustls", features = ["ring", "aws_lc_rs"] }
+rustls = { package = "shaped-rustls", path = "../rustls", features = ["ring", "aws_lc_rs"] }
rustls-test = { workspace = true }
rustls-fuzzing-provider = { workspace = true }
diff --git a/ci-bench/src/util.rs b/ci-bench/src/util.rs
index 8ac4b34b4c2..4a014d9b508 100644
--- a/ci-bench/src/util.rs
+++ b/ci-bench/src/util.rs
@@ -1,3 +1,4 @@
+#[allow(clippy::double_must_use)] // https://github.com/rust-lang/rust-clippy/issues/17529
pub(crate) mod async_io {
//! Async IO building blocks required for sharing code between the instruction count and
//! wall-time benchmarks
@@ -348,6 +349,7 @@ pub(crate) mod async_io {
}
}
+#[allow(clippy::std_instead_of_core)] // awaits core::io::Cursor in stable (1.97)
pub(crate) mod transport {
//! Custom functions to interact between rustls clients and a servers.
//!
diff --git a/connect-tests/Cargo.toml b/connect-tests/Cargo.toml
index 548c70d946d..8d854c8982b 100644
--- a/connect-tests/Cargo.toml
+++ b/connect-tests/Cargo.toml
@@ -7,10 +7,9 @@ description = "Rustls connectivity based integration tests."
publish = false
[dependencies]
-rustls = { path = "../rustls", features = ["logging"] }
+rustls = { package = "shaped-rustls", path = "../rustls", features = ["logging"] }
[dev-dependencies]
-hickory-resolver = { workspace = true }
regex = { workspace = true }
ring = { workspace = true }
tokio = { workspace = true }
diff --git a/connect-tests/tests/ech.rs b/connect-tests/tests/ech.rs
deleted file mode 100644
index 9b56eac2f28..00000000000
--- a/connect-tests/tests/ech.rs
+++ /dev/null
@@ -1,67 +0,0 @@
-mod ech_config {
- use hickory_resolver::config::ResolverConfig;
- use hickory_resolver::name_server::TokioConnectionProvider;
- use hickory_resolver::proto::rr::rdata::svcb::{SvcParamKey, SvcParamValue};
- use hickory_resolver::proto::rr::{RData, RecordType};
- use hickory_resolver::{Resolver, TokioResolver};
- use rustls::internal::msgs::codec::{Codec, Reader};
- use rustls::internal::msgs::handshake::EchConfigPayload;
- use rustls::pki_types::EchConfigListBytes;
-
- #[tokio::test]
- async fn cloudflare() {
- test_deserialize_ech_config_list("research.cloudflare.com").await;
- }
-
- #[tokio::test]
- async fn defo_ie() {
- test_deserialize_ech_config_list("defo.ie").await;
- }
-
- #[tokio::test]
- async fn tls_ech_dev() {
- test_deserialize_ech_config_list("tls-ech.dev").await;
- }
-
- /// Lookup the ECH config list for a domain and deserialize it.
- async fn test_deserialize_ech_config_list(domain: &str) {
- let resolver = Resolver::builder_with_config(
- ResolverConfig::google_https(),
- TokioConnectionProvider::default(),
- )
- .build();
- let tls_encoded_list = lookup_ech(&resolver, domain).await;
- let parsed_configs = Vec::::read(&mut Reader::init(&tls_encoded_list))
- .expect("failed to deserialize ECH config list");
- assert!(!parsed_configs.is_empty());
- assert!(
- parsed_configs
- .iter()
- .all(|config| matches!(config, EchConfigPayload::V18(_)))
- );
- }
-
- /// Use `resolver` to make an HTTPS record type query for `domain`, returning the
- /// first SvcParam EchConfig value found, panicking if none are returned.
- async fn lookup_ech(resolver: &TokioResolver, domain: &str) -> EchConfigListBytes<'static> {
- resolver
- .lookup(domain, RecordType::HTTPS)
- .await
- .expect("failed to lookup HTTPS record type")
- .record_iter()
- .find_map(|r| match r.data() {
- RData::HTTPS(svcb) => svcb
- .svc_params()
- .iter()
- .find_map(|sp| match sp {
- (SvcParamKey::EchConfigList, SvcParamValue::EchConfigList(e)) => {
- Some(e.clone().0)
- }
- _ => None,
- }),
- _ => None,
- })
- .expect("missing expected HTTPS SvcParam EchConfig record")
- .into()
- }
-}
diff --git a/deny.toml b/deny.toml
index b0559e7c6cd..1647cd8435d 100644
--- a/deny.toml
+++ b/deny.toml
@@ -17,4 +17,9 @@ private = { ignore = true }
ignore = [
"RUSTSEC-2023-0071", # Marvin Attack on rsa, dev-dependency only
"RUSTSEC-2024-0436", # Unmaintained paste via macro_rules_attributes; dev-dependency only
+ "RUSTSEC-2026-0173", # Unmaintained proc-macro-error2 via graviola -> libcrux; dev-dependency only
+ "RUSTSEC-2026-0207", # Broken libcrux-sha3, no fixed version for our MSRV via zeroize (dropped on main)
+ "RUSTSEC-2026-0208", # Ditto
+ "RUSTSEC-2026-0212", # Ditto for libcrux-secrets
+ "RUSTSEC-2026-0387", # Timing variability in crypto-bigint 0.5 via elliptic-curve 0.13; provider example and dev-dependencies only, no compatible fixed release
]
diff --git a/examples/Cargo.toml b/examples/Cargo.toml
index ce694b8fceb..41e45210474 100644
--- a/examples/Cargo.toml
+++ b/examples/Cargo.toml
@@ -13,7 +13,7 @@ hickory-resolver = { workspace = true }
log = { workspace = true }
mio = { workspace = true }
rcgen = { workspace = true }
-rustls = { path = "../rustls", features = ["logging"] }
+rustls = { package = "shaped-rustls", path = "../rustls", features = ["logging"] }
serde = { workspace = true }
tokio = { workspace = true }
webpki-roots = { workspace = true }
diff --git a/examples/src/bin/ech-client.rs b/examples/src/bin/ech-client.rs
index a8bf9896398..38439a2d411 100644
--- a/examples/src/bin/ech-client.rs
+++ b/examples/src/bin/ech-client.rs
@@ -35,11 +35,12 @@ use std::net::{TcpStream, ToSocketAddrs};
use std::sync::Arc;
use clap::Parser;
-use hickory_resolver::config::ResolverConfig;
-use hickory_resolver::name_server::TokioConnectionProvider;
+use hickory_resolver::config::{CLOUDFLARE, GOOGLE, ResolverConfig};
+use hickory_resolver::net::NetError;
+use hickory_resolver::net::runtime::TokioRuntimeProvider;
use hickory_resolver::proto::rr::rdata::svcb::{SvcParamKey, SvcParamValue};
use hickory_resolver::proto::rr::{RData, RecordType};
-use hickory_resolver::{ResolveError, Resolver, TokioResolver};
+use hickory_resolver::{Resolver, TokioResolver};
use log::trace;
use rustls::RootCertStore;
use rustls::client::{EchConfig, EchGreaseConfig, EchMode, EchStatus};
@@ -63,14 +64,14 @@ async fn main() -> Result<(), Box> {
}
(false, None) => {
// Find raw ECH configs using DNS-over-HTTPS with Hickory DNS.
- let resolver_config = if args.use_cloudflare_dns {
- ResolverConfig::cloudflare_https()
- } else {
- ResolverConfig::google_https()
- };
+ let resolver_config = ResolverConfig::https(match args.use_cloudflare_dns {
+ true => &CLOUDFLARE,
+ false => &GOOGLE,
+ });
+
lookup_ech_configs(
- &Resolver::builder_with_config(resolver_config, TokioConnectionProvider::default())
- .build(),
+ &Resolver::builder_with_config(resolver_config, TokioRuntimeProvider::default())
+ .build()?,
&args.inner_hostname,
args.port,
)
@@ -229,7 +230,7 @@ async fn lookup_ech_configs(
resolver: &TokioResolver,
domain: &str,
port: u16,
-) -> Result>, ResolveError> {
+) -> Result>, NetError> {
// For non-standard ports, lookup the ECHConfig using port-prefix naming
// See: https://datatracker.ietf.org/doc/html/rfc9460#section-9.1
let qname_to_lookup = match port {
@@ -242,13 +243,13 @@ async fn lookup_ech_configs(
.await?;
let mut ech_config_lists = Vec::new();
- for r in lookup.record_iter() {
- let RData::HTTPS(svcb) = r.data() else {
+ for r in lookup.answers() {
+ let RData::HTTPS(svcb) = &r.data else {
continue;
};
ech_config_lists.extend(
- svcb.svc_params()
+ svcb.svc_params
.iter()
.find_map(|sp| match sp {
(SvcParamKey::EchConfigList, SvcParamValue::EchConfigList(e)) => {
diff --git a/fuzz/Cargo.lock b/fuzz/Cargo.lock
index 10807ff9d56..d517a4fcc00 100644
--- a/fuzz/Cargo.lock
+++ b/fuzz/Cargo.lock
@@ -273,33 +273,21 @@ dependencies = [
"windows-sys 0.52.0",
]
-[[package]]
-name = "rustls"
-version = "0.23.40"
-dependencies = [
- "log",
- "once_cell",
- "rustls-pki-types",
- "rustls-webpki",
- "subtle",
- "zeroize",
-]
-
[[package]]
name = "rustls-fuzz"
version = "0.0.1"
dependencies = [
"env_logger",
"libfuzzer-sys",
- "rustls",
"rustls-fuzzing-provider",
+ "shaped-rustls",
]
[[package]]
name = "rustls-fuzzing-provider"
version = "0.1.0"
dependencies = [
- "rustls",
+ "shaped-rustls",
]
[[package]]
@@ -313,9 +301,9 @@ dependencies = [
[[package]]
name = "rustls-webpki"
-version = "0.103.5"
+version = "0.103.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5a37813727b78798e53c2bec3f5e8fe12a6d6f8389bf9ca7802add4c9905ad8"
+checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2"
dependencies = [
"ring",
"rustls-pki-types",
@@ -342,6 +330,18 @@ dependencies = [
"syn",
]
+[[package]]
+name = "shaped-rustls"
+version = "0.23.4600"
+dependencies = [
+ "log",
+ "once_cell",
+ "rustls-pki-types",
+ "rustls-webpki",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "shlex"
version = "1.3.0"
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index b2884a8e10e..23871719d41 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -11,7 +11,7 @@ cargo-fuzz = true
[dependencies]
env_logger = "0.11"
libfuzzer-sys = "0.4"
-rustls = { path = "../rustls", default-features = false, features = ["std", "tls12", "custom-provider"] }
+rustls = { package = "shaped-rustls", path = "../rustls", default-features = false, features = ["std", "tls12", "custom-provider"] }
rustls-fuzzing-provider = { path = "../rustls-fuzzing-provider" }
# Prevent this from interfering with workspaces
diff --git a/openssl-tests/Cargo.toml b/openssl-tests/Cargo.toml
index ab2b50044ba..4cdbf965d4a 100644
--- a/openssl-tests/Cargo.toml
+++ b/openssl-tests/Cargo.toml
@@ -11,5 +11,5 @@ asn1 = { workspace = true }
base64 = { workspace = true }
num-bigint = { workspace = true }
once_cell = { workspace = true }
-rustls = { path = "../rustls" }
+rustls = { package = "shaped-rustls", path = "../rustls" }
openssl = { workspace = true }
diff --git a/openssl-tests/src/raw_key_openssl_interop.rs b/openssl-tests/src/raw_key_openssl_interop.rs
index a6d8b50aadf..c82c26c14bb 100644
--- a/openssl-tests/src/raw_key_openssl_interop.rs
+++ b/openssl-tests/src/raw_key_openssl_interop.rs
@@ -150,6 +150,7 @@ mod client {
}
mod server {
+ #![allow(clippy::std_instead_of_core)] // awaits core::io::ErrorKind in stable (1.97)
use std::io::{self, ErrorKind, Read, Write};
use std::net::TcpListener;
use std::sync::Arc;
diff --git a/provider-example/Cargo.toml b/provider-example/Cargo.toml
index 3ca1a442311..831c7c3d222 100644
--- a/provider-example/Cargo.toml
+++ b/provider-example/Cargo.toml
@@ -17,7 +17,7 @@ hpke-rs-rust-crypto = { workspace = true }
p256 = { workspace = true }
pkcs8 = { workspace = true }
rand_core = { workspace = true }
-rustls = { path = "../rustls", default-features = false, features = ["logging", "tls12"] }
+rustls = { package = "shaped-rustls", path = "../rustls", default-features = false, features = ["logging", "tls12"] }
rsa = { workspace = true }
sha2 = { workspace = true }
signature = { workspace = true }
diff --git a/rustls-bench/Cargo.toml b/rustls-bench/Cargo.toml
index 89d8e725369..8e12662c77e 100644
--- a/rustls-bench/Cargo.toml
+++ b/rustls-bench/Cargo.toml
@@ -6,7 +6,7 @@ publish = false
[dependencies]
clap = { workspace = true }
-rustls = { path = "../rustls" }
+rustls = { package = "shaped-rustls", path = "../rustls" }
rustls-graviola = { workspace = true, optional = true }
rustls-post-quantum = { path = "../rustls-post-quantum", optional = true }
rustls-test = { workspace = true }
diff --git a/rustls-fuzzing-provider/Cargo.toml b/rustls-fuzzing-provider/Cargo.toml
index 80d6ae06523..bbe79899f5e 100644
--- a/rustls-fuzzing-provider/Cargo.toml
+++ b/rustls-fuzzing-provider/Cargo.toml
@@ -5,7 +5,7 @@ edition = "2021"
publish = false
[dependencies]
-rustls = { path = "../rustls", default-features = false, features = ["logging", "std", "tls12"] }
+rustls = { package = "shaped-rustls", path = "../rustls", default-features = false, features = ["logging", "std", "tls12"] }
[dev-dependencies]
env_logger = { workspace = true }
diff --git a/rustls-post-quantum/Cargo.toml b/rustls-post-quantum/Cargo.toml
index 4c17db70ba4..bfde56f035d 100644
--- a/rustls-post-quantum/Cargo.toml
+++ b/rustls-post-quantum/Cargo.toml
@@ -12,7 +12,7 @@ categories = ["network-programming", "cryptography"]
autobenches = false
[dependencies]
-rustls = { version = "0.23.22", features = ["aws_lc_rs", "prefer-post-quantum"], path = "../rustls" }
+rustls = { package = "shaped-rustls", version = "0.23.22", features = ["aws_lc_rs", "prefer-post-quantum"], path = "../rustls" }
[dev-dependencies]
criterion = { workspace = true }
diff --git a/rustls-provider-test/Cargo.toml b/rustls-provider-test/Cargo.toml
index 205e391df97..23c00d531b1 100644
--- a/rustls-provider-test/Cargo.toml
+++ b/rustls-provider-test/Cargo.toml
@@ -9,6 +9,6 @@ publish = false
[dependencies]
hex = "0.4"
provider-example = { package = "rustls-provider-example", version = "0.0.1", path = "../provider-example" }
-rustls = { version = "0.23.8", features = ["aws_lc_rs", "logging"], path = "../rustls" }
+rustls = { package = "shaped-rustls", version = "0.23.8", features = ["aws_lc_rs", "logging"], path = "../rustls" }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
diff --git a/rustls-test/Cargo.toml b/rustls-test/Cargo.toml
index 877ec34833e..6776c68f5b0 100644
--- a/rustls-test/Cargo.toml
+++ b/rustls-test/Cargo.toml
@@ -5,4 +5,4 @@ edition = "2021"
publish = false
[dependencies]
-rustls = { path = "../rustls", default-features = false, features = ["std", "tls12"] }
+rustls = { package = "shaped-rustls", path = "../rustls", default-features = false, features = ["std", "tls12"] }
diff --git a/rustls-test/src/lib.rs b/rustls-test/src/lib.rs
index e47b3502696..88fbff0bdee 100644
--- a/rustls-test/src/lib.rs
+++ b/rustls-test/src/lib.rs
@@ -1025,6 +1025,11 @@ impl io::Write for TestNonBlockIo {
impl Drop for TestNonBlockIo {
fn drop(&mut self) {
+ // avoid aborting on a double panic, which would hide the original failure
+ if std::thread::panicking() {
+ return;
+ }
+
// ensure the object was exhausted as expected
assert!(self.reads.is_empty());
assert!(self.writes.is_empty());
@@ -1432,12 +1437,16 @@ impl RawTls {
let encrypter = match (tx_keys, suite) {
(
- rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv },
+ rustls::ConnectionTrafficSecrets::Aes128Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Chacha20Poly1305 { key, iv },
SupportedCipherSuite::Tls13(tls13),
) => tls13.aead_alg.encrypter(key, iv),
(
- rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv },
+ rustls::ConnectionTrafficSecrets::Aes128Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Chacha20Poly1305 { key, iv },
SupportedCipherSuite::Tls12(tls12),
) => tls12
.aead_alg
@@ -1448,12 +1457,16 @@ impl RawTls {
let decrypter = match (rx_keys, suite) {
(
- rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv },
+ rustls::ConnectionTrafficSecrets::Aes128Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Chacha20Poly1305 { key, iv },
SupportedCipherSuite::Tls13(tls13),
) => tls13.aead_alg.decrypter(key, iv),
(
- rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv },
+ rustls::ConnectionTrafficSecrets::Aes128Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Aes256Gcm { key, iv }
+ | rustls::ConnectionTrafficSecrets::Chacha20Poly1305 { key, iv },
SupportedCipherSuite::Tls12(tls12),
) => tls12
.aead_alg
@@ -1475,14 +1488,20 @@ impl RawTls {
msg: &PlainMessage,
peer: &mut impl DerefMut>,
) {
+ let data = self.encrypt(msg);
+ peer.read_tls(&mut io::Cursor::new(data))
+ .unwrap();
+ }
+
+ /// Encrypt `msg` into a complete TLS record, including its header
+ pub fn encrypt(&mut self, msg: &PlainMessage) -> Vec {
let data = self
.encrypter
.encrypt(msg.borrow_outbound(), self.enc_seq)
.unwrap()
.encode();
self.enc_seq += 1;
- peer.read_tls(&mut io::Cursor::new(data))
- .unwrap();
+ data
}
pub fn receive_and_decrypt(
@@ -1804,15 +1823,17 @@ pub mod encoding {
}
}
+ pub fn new_versions_server_tls13() -> Self {
+ Self {
+ typ: ExtensionType::SupportedVersions,
+ body: ProtocolVersion::TLSv1_3
+ .to_array()
+ .to_vec(),
+ }
+ }
+
pub fn new_dummy_key_share() -> Self {
- const SOME_POINT_ON_P256: &[u8] = &[
- 4, 41, 39, 177, 5, 18, 186, 227, 237, 220, 254, 70, 120, 40, 18, 139, 173, 41, 3,
- 38, 153, 25, 247, 8, 96, 105, 200, 196, 223, 108, 115, 40, 56, 199, 120, 121, 100,
- 234, 172, 0, 229, 146, 31, 177, 73, 138, 96, 244, 96, 103, 102, 179, 217, 104, 80,
- 1, 85, 141, 26, 151, 78, 115, 65, 81, 62,
- ];
-
- let mut share = len_u16(SOME_POINT_ON_P256.to_vec());
+ let mut share = len_u16(Self::SOME_POINT_ON_P256.to_vec());
share.splice(0..0, NamedGroup::secp256r1.to_array());
Self {
@@ -1821,12 +1842,29 @@ pub mod encoding {
}
}
+ pub fn new_dummy_key_share_server() -> Self {
+ let mut share = len_u16(Self::SOME_POINT_ON_P256.to_vec());
+ share.splice(0..0, NamedGroup::secp256r1.to_array());
+
+ Self {
+ typ: ExtensionType::KeyShare,
+ body: share,
+ }
+ }
+
pub fn new_alpn(body: &[u8]) -> Self {
Self {
typ: ExtensionType::ALProtocolNegotiation,
body: len_u16(body.to_vec()),
}
}
+
+ const SOME_POINT_ON_P256: &[u8] = &[
+ 4, 41, 39, 177, 5, 18, 186, 227, 237, 220, 254, 70, 120, 40, 18, 139, 173, 41, 3, 38,
+ 153, 25, 247, 8, 96, 105, 200, 196, 223, 108, 115, 40, 56, 199, 120, 121, 100, 234,
+ 172, 0, 229, 146, 31, 177, 73, 138, 96, 244, 96, 103, 102, 179, 217, 104, 80, 1, 85,
+ 141, 26, 151, 78, 115, 65, 81, 62,
+ ];
}
/// Prefix with u8 length
diff --git a/rustls/.clippy.toml b/rustls/.clippy.toml
index 8b79eddd64c..581087081f3 100644
--- a/rustls/.clippy.toml
+++ b/rustls/.clippy.toml
@@ -1,5 +1,10 @@
upper-case-acronyms-aggressive = true
+# Upstream's code is written for Rust 1.71. The manifest says 1.85 because of a
+# dependency this fork adds; without this, Clippy would ask to rewrite upstream's
+# code for the newer version.
+msrv = "1.71"
+
disallowed-types = [
{ path = "std::sync::Arc", reason = "must use Arc from sync module to support downstream forks targeting architectures without atomic ptrs" },
{ path = "std::sync::Weak", reason = "must use Weak from sync module to support downstream forks targeting architectures without atomic ptrs" },
diff --git a/rustls/Cargo.toml b/rustls/Cargo.toml
index 1713f4c3679..22fc58effaa 100644
--- a/rustls/Cargo.toml
+++ b/rustls/Cargo.toml
@@ -1,19 +1,24 @@
[package]
-name = "rustls"
-version = "0.23.40"
+name = "shaped-rustls"
+version = "0.23.4600"
edition = "2021"
-rust-version = "1.71"
+rust-version = "1.85"
license = "Apache-2.0 OR ISC OR MIT"
readme = "../README.md"
-description = "Rustls is a modern TLS library written in Rust."
-homepage = "https://github.com/rustls/rustls"
-repository = "https://github.com/rustls/rustls"
+description = "A fork of rustls 0.23.46 with an opt-in API for shaping the TLS ClientHello (browser and uTLS fingerprints)."
+repository = "https://github.com/aimalygin/shaped-rustls"
categories = ["network-programming", "cryptography"]
+keywords = ["tls", "rustls", "clienthello", "fingerprint", "utls"]
autobenches = false
autotests = false
exclude = ["src/testdata", "tests/**"]
build = "build.rs"
+# The library keeps upstream's name, so that code written for rustls compiles
+# against this package unchanged.
+[lib]
+name = "rustls"
+
[features]
default = ["aws_lc_rs", "logging", "prefer-post-quantum", "std", "tls12"]
diff --git a/rustls/src/client/builder.rs b/rustls/src/client/builder.rs
index 30bf8a230e7..8b8c8f23b29 100644
--- a/rustls/src/client/builder.rs
+++ b/rustls/src/client/builder.rs
@@ -186,6 +186,7 @@ impl ConfigBuilder {
cert_compression_cache: Arc::new(compress::CompressionCache::default()),
cert_decompressors: compress::default_cert_decompressors().to_vec(),
ech_mode: self.state.client_ech_mode,
+ send_ticket_request: None,
}
}
}
diff --git a/rustls/src/client/client_conn.rs b/rustls/src/client/client_conn.rs
index 8c164ed9d3d..ee41824f178 100644
--- a/rustls/src/client/client_conn.rs
+++ b/rustls/src/client/client_conn.rs
@@ -293,6 +293,22 @@ pub struct ClientConfig {
/// How to offer Encrypted Client Hello (ECH). The default is to not offer ECH.
pub(super) ech_mode: Option,
+
+ /// Request a specific number of TLS 1.3 session tickets via [RFC 9149].
+ ///
+ /// Set to `None` to disable sending the extension (the default).
+ ///
+ /// [RFC 9149]: https://datatracker.ietf.org/doc/html/rfc9149
+ pub send_ticket_request: Option,
+}
+
+/// Desired session ticket counts for the RFC 9149 `ticket_request` extension.
+#[derive(Clone, Copy, Debug, PartialEq)]
+pub struct TicketRequest {
+ /// Tickets desired when the server negotiates a new connection.
+ pub new_session_count: u8,
+ /// Tickets desired when the server resumes using a presented ticket.
+ pub resumption_count: u8,
}
impl ClientConfig {
@@ -415,19 +431,20 @@ impl ClientConfig {
}
pub(super) fn needs_key_share(&self) -> bool {
- self.supports_version(ProtocolVersion::TLSv1_3)
+ self.supports_version(ProtocolVersion::TLSv1_3, Protocol::Tcp)
}
/// We support a given TLS version if it's quoted in the configured
/// versions *and* at least one ciphersuite for this version is
/// also configured.
- pub(crate) fn supports_version(&self, v: ProtocolVersion) -> bool {
+ pub(crate) fn supports_version(&self, v: ProtocolVersion, protocol: Protocol) -> bool {
self.versions.contains(v)
&& self
.provider
.cipher_suites
.iter()
.any(|cs| cs.version().version == v)
+ && protocol.supports_version(v)
}
#[cfg(feature = "std")]
@@ -438,12 +455,16 @@ impl ClientConfig {
.any(|cs| cs.usable_for_protocol(proto))
}
- pub(super) fn find_cipher_suite(&self, suite: CipherSuite) -> Option {
+ pub(super) fn find_cipher_suite(
+ &self,
+ suite: CipherSuite,
+ protocol: Protocol,
+ ) -> Option {
self.provider
.cipher_suites
.iter()
.copied()
- .find(|&scs| scs.suite() == suite)
+ .find(|&scs| scs.suite() == suite && scs.usable_for_protocol(protocol))
}
pub(super) fn find_kx_group(
diff --git a/rustls/src/client/client_hello.rs b/rustls/src/client/client_hello.rs
index ccbcf231360..5b8b9fab08d 100644
--- a/rustls/src/client/client_hello.rs
+++ b/rustls/src/client/client_hello.rs
@@ -332,17 +332,17 @@ where
K: Ord,
{
if values.is_empty() {
- return Err(Error::General(
- format!("ClientHello {what} cannot be empty").into(),
- ));
+ return Err(Error::General(format!(
+ "ClientHello {what} cannot be empty"
+ )));
}
let mut seen = BTreeSet::new();
for value in values {
if !seen.insert(key(*value)) {
- return Err(Error::General(
- format!("ClientHello {what} contains a duplicate value").into(),
- ));
+ return Err(Error::General(format!(
+ "ClientHello {what} contains a duplicate value"
+ )));
}
}
@@ -351,9 +351,9 @@ where
fn reject_empty(values: &[T], what: &str) -> Result<(), Error> {
if values.is_empty() {
- return Err(Error::General(
- format!("ClientHello {what} cannot be empty").into(),
- ));
+ return Err(Error::General(format!(
+ "ClientHello {what} cannot be empty"
+ )));
}
Ok(())
diff --git a/rustls/src/client/common.rs b/rustls/src/client/common.rs
index 9afa0c3410f..1bf0d8c7758 100644
--- a/rustls/src/client/common.rs
+++ b/rustls/src/client/common.rs
@@ -6,7 +6,7 @@ use crate::log::{debug, trace};
use crate::msgs::enums::ExtensionType;
use crate::msgs::handshake::{CertificateChain, DistinguishedName, ProtocolName, ServerExtensions};
use crate::sync::Arc;
-use crate::{SignatureScheme, compress, sign};
+use crate::{CipherSuite, SignatureScheme, compress, sign};
#[derive(Debug)]
pub(super) struct ServerCertDetails<'a> {
@@ -39,6 +39,7 @@ pub(super) struct ClientHelloDetails {
pub(super) sent_extensions: Vec,
pub(super) extension_order_seed: u16,
pub(super) offered_cert_compression: bool,
+ pub(super) offered_cipher_suites: Vec,
}
impl ClientHelloDetails {
@@ -48,6 +49,7 @@ impl ClientHelloDetails {
sent_extensions: Vec::new(),
extension_order_seed,
offered_cert_compression: false,
+ offered_cipher_suites: Vec::new(),
}
}
diff --git a/rustls/src/client/ech.rs b/rustls/src/client/ech.rs
index 5675e71d092..88949d3e08a 100644
--- a/rustls/src/client/ech.rs
+++ b/rustls/src/client/ech.rs
@@ -326,6 +326,9 @@ pub(crate) struct EchState {
enable_sni: bool,
// The extensions sent in the inner hello.
sent_extensions: Vec,
+ // Whether a hello retry request accepted our ECH offer, if we received one. RFC 9849
+ // section 6.1.4 makes that decision final.
+ accepted_by_hello_retry_request: Option,
}
impl EchState {
@@ -370,6 +373,7 @@ impl EchState {
early_data_key_schedule: None,
enable_sni,
sent_extensions: Vec::new(),
+ accepted_by_hello_retry_request: None,
})
}
@@ -452,7 +456,17 @@ impl EchState {
server_hello: &ServerHelloPayload,
server_hello_encoded: &Payload<'_>,
hash: &'static dyn Hash,
+ server_name: &mut ServerName<'static>,
+ common: &mut CommonState,
) -> Result