127 Commits
Author SHA1 Message Date
Dirkjan Ochtman b17d888b53 rustls-test: move provider crates to dev-dependencies 2026-09-03 14:27:42 +00:00
Sebastien Tardif 7fae146e73 admin: include rustls-util unit tests in coverage
rustls-util is not a workspace default-member, so cargo test in
admin/coverage never ran its unit tests.
2026-08-18 14:24:28 +00:00
Joe Birr-Pixton 59366f220b Refresh logo: add license & source
rustls-logo-web.png is retained as it is referenced in
existing releases.
2026-04-08 12:28:56 +00:00
Dirkjan Ochtman d32adc5b12 Move verifybench into rustls-test 2026-02-04 12:11:57 +00:00
Dirkjan Ochtman 8c83f49645 Externalize aws-lc crypto provider 2026-01-15 15:54:13 +00:00
Dirkjan Ochtman fabc9a6c68 Extract ring crypto provider into rustls-ring crate 2025-11-18 14:02:42 +00:00
Joe Birr-Pixton 7a04e38cda spelling: avoid "thr" 2025-09-17 08:25:55 +00:00
Joe Birr-Pixton 36cb566b7d Enable branch coverage measurement 2025-09-11 10:53:27 +00:00
Joe Birr-Pixton ce318437dc Eliminate tls12 crate feature
This is now achieved by a downstream program not referencing any
TLS1.2 cipher suites/SupportedProtocolVersions, and the linker should
remove `rustls::version::TLS12` and everything hanging off it (which
includes the bottom half of the TLS1.2 handshake) via --gc-sections.
2025-07-28 08:15:27 +00:00
Joe Birr-Pixton afa22bb8e1 Withdraw "aws_lc_rs" spelling of "aws-lc-rc" feature 2025-07-10 13:38:34 +00:00
Joe Birr-Pixton 192ab85a5c Rename "logging" feature -> "log" 2025-07-10 13:38:34 +00:00
Joe Birr-Pixton 560c5af2a3 Disable rustls-bench+graviola in CI
Unfortunately there are now two incompatible rustls versions in play.
2025-07-10 13:38:34 +00:00
Joe Birr-Pixton 708a91731c Move tests/common/mod.rs to rustls-test crate
Everything moves, with the exception of parts that depend on the
cargo features of the rustls crate.
2025-05-21 09:28:41 +00:00
Joe Birr-Pixton 7a64c74146 admin/coverage: only measure core crate coverage 2025-03-12 17:52:25 +00:00
Joe Birr-Pixton e945935896 re-admit rustls-post-quantum to workspace 2024-12-19 08:35:30 +00:00
Joe Birr-Pixton 7780b0fca3 rustls-bench: support rustls-post-quantum 2024-12-17 16:21:24 +00:00
@brodycj - C. Jonathan Brody deb04c286c improve provider-example CI testing & coverage testing 2024-12-12 17:33:26 +00:00
Joe Birr-Pixton fc6b4a193b Reduce wasted time in benchmarks
eg. we don't publish ed25519 benchmarks at the minute, so running
them is a waste of effort.

This only applies to TLS1.3 tests, as TLS1.2 implies the auth key
type already.
2024-11-26 09:47:50 +00:00
Joe Birr-Pixton 7c06ae41e5 bench: allow test case selection by key type 2024-11-26 09:47:50 +00:00
Joe Birr-Pixton 43ead219e4 bench: record individual handshake latencies 2024-11-26 09:47:50 +00:00
Joe Birr-Pixton 460362eb2b bench: runtime selection of provider
This means bench can be built for several providers at once,
which then requires (eg) `--provider aws-lc-rs` to be specified.
If there is one provider specified by crate features, this is used
implicitly.
2024-11-18 12:04:54 +00:00
Joe Birr-Pixton 9e572fa7ee split bench tool into its own workspace crate 2024-11-18 12:04:54 +00:00
Joe Birr-Pixton d1c33f8641 bench: support threaded bulk tests 2024-11-08 17:31:28 +00:00
Joe Birr-Pixton a5d510ea4e bench: support threaded handshake tests 2024-11-08 17:31:28 +00:00
Joe Birr-Pixton 121d813ca8 Avoid feature unification for bogo
It is no longer possible for rustls-post-quantum and rustls/fips
to co-exist.  Bleed that fact into bogo's crate features.

admin/all-workspace-members is a helper to assist running a
command many times for each workspace member, while avoiding
unification.

Hoist clippy calls into a script for use from CI
2024-10-25 15:21:58 +00:00
Joe Birr-Pixton d58f86d3fd bench-measure.mk: rebuild bench each time
This is ~free if it is already fresh.
2024-10-16 11:47:52 +00:00
Dirkjan Ochtman d57db7438e Remove example interface description from the README 2024-09-20 13:08:50 +00:00
Joe Birr-Pixton f17866cd40 Reinstate coverage of CryptoProvider provider fns
`from_crate_features()` and `get_default_or_install_from_crate_features()`
became uncovered since 3249a5b39 due to unwanted workspace feature unification.
2024-08-19 14:34:37 +00:00
Joe Birr-Pixton b7187880b4 add ecdsa+eddsa for aes-256 suite tests
This is suite used for comparative handshake benchmarks
with openssl.
2024-07-05 15:23:11 +00:00
Joseph Birr-Pixton aff6df2128 admin/coverage: correct latent zlib-rs feature use 2024-06-06 18:42:22 +00:00
Joseph Birr-Pixton dafc7ac234 Run bogo FIPS tests
This is not straightforward because:

- the tests want the FIPS selection to be at runtime, so we
  reconstruct the non-FIPS CryptoProvider and use that unless
  the `-fips-202205` is passed to the shim.
- BoringSSL's FIPS evaluation is (presumably) older than aws-lc-rs,
  and doesn't include ED25519 (ref. FIPS 186-5) or P521.

However, this does provider test coverage that:

- X25519 is not usable
- chacha20-poly1305 is not usable
2024-06-06 18:42:22 +00:00
Daniel McCarney 209e892992 add crate for provider integration tests
As an initial starting point, test that the aws-lc-rs HPKE suites from
the main rustls crate and the hpke-rs HPKE suites from the
provider-example crate can interoperate.

This process is slower (~30s) so having the tests in a separate crate is
helpful. It also allows us to take heavier deps (like the
provider-example crate, hpke-rs and rust crypto).
2024-05-31 12:46:48 +00:00
Joseph Birr-Pixton e14285289a Support certificate compression using brotli
We take a dependency on `brotli-decompressor` crate (even though we
only use it through the `brotli` crate) to ensure its version
includes a DOS fix.
2024-05-31 11:08:48 +00:00
Joseph Birr-Pixton ce3d12a933 Replace manual feature computations with python script
Inspired by actix/actix-net's justfile.
2024-05-21 07:16:33 +00:00
Joe Birr-Pixton 03e44999a5 admin/coverage: pass script args to all llvm-cov calls
This allows the new, nightly-only, `--branch` argument to
get everywhere it needs to.  That enables branch coverage
tracking.

Example use:

$ ./admin/coverage --branch --html --open
2024-03-20 16:28:08 +00:00
Simon Tate b3750ee835 Add auto build to bench-measure
To allow for easy running and simplification of benchmarking, add cargo
build to the bench measure.

Also add .PHONY for recipes with no output that are always expected to
run.
2024-03-19 08:41:19 +00:00
Joe Birr-Pixton cf098b08d3 Cargo.toml: disentangle std/aws_lc_rs features 2024-02-28 20:27:34 +00:00
Joseph Birr-Pixton 3f0e0fc66f Fix broken link to CryptoProvider 2024-02-19 11:05:47 +00:00
Joseph Birr-Pixton e2c5276cac Update manual::features and refer to it 2024-02-19 11:05:47 +00:00
Sean McGrail 6bd851e72e Add 'fips' Cargo feature
Add `rustls::crypto::default_fips_provider()` behind this
feature.
2024-02-02 16:57:39 +00:00
Daniel McCarney d9d0879432 docs: add more documentation on crypto providers
* Describe why crypto providers exist, how they are chosen
* Enumerate the built-in providers and associated feature flags
* Link to third-party providers we're aware of
* Add some documentation about implementing a custom provider
2024-01-18 15:18:26 +00:00
Joseph Birr-Pixton c8c46bea4d Run bogo against both ring and aws-lc-rs providers 2023-11-21 09:58:03 +00:00
Dirkjan Ochtman 78c8ff4d96 Use Cargo.lock for CI builds 2023-09-26 13:38:35 +00:00
Daniel McCarney 25bc1b3ecd chore: delete admin/format-bench.
The `admin/format-bench` script has bitrot so that it no longer
functions with the current output produced by the benchmark tooling.

It's not clear that this tool is still needed, so rather than fix it or
port it to Rust, we choose to remove it outright.

If it turns out there is a need for formatting benchmarking output we
should consider building that into the benchmark tool itself to avoid
needing to deal with a Python tool-chain and associated versioning
challenges.
2023-03-03 22:08:14 +01:00
Daniel McCarney 2149288539 fix: avoid hardcoded python3 path, fix prints.
Prior to this commit the admin `bench-range`, `capture-certdata` and
`format-bench` Python helpers used a hardcoded path to Python3 in their
shebang. This commit updates each to use `/usr/bin/env` to find
`python3` in the `$PATH`.

These helpers also used Python2 style `print` statements instead of the
Python3 style `print` function. This commit adds the required braces to
fix Python3 usage.
2023-03-02 10:28:10 +01:00
Daniel McCarney 44bac99c6e fix: avoid hardcoded (ba)sh path in helper scripts.
Prior to this commit some helper scripts used hardcoded paths to
`/bin/sh` and `/bin/bash` in script shebangs. This will error on systems
that don't place `bash` in `/bin/` (e.g. NixOS).

This commit updates the scripts to use `/usr/bin/env` to find `bash`
based on the user's `$PATH`. This has better portability and allows the
scripts to run without err (or specifying an interpreter explicitly) on
systems with atypical `bash` installs.
2023-03-02 10:28:10 +01:00
Joseph Birr-Pixton 6087246dbf Measure coverage using cargo-llvm-cov
This deletes quite a bit of ad-hoc scripting that is
replaced by llvm-cov.
2022-12-31 13:23:01 +00:00
Francis Russell 4e6fe619c1 Update pull-usage script. 2022-10-31 10:21:28 +01:00
Joseph Birr-Pixton 8f10338d53 Use absolute path to admin/llvm-gcov 2022-08-15 15:45:22 +02:00
Dirkjan Ochtman f2e4d88d05 Use stable instrument-coverage flag 2022-08-15 15:45:22 +02:00