Commit Graph

30 Commits

Author SHA1 Message Date
Brian Smith 94e6e88ed9 CI: Use free macOS runners for aarch64-apple-darwin jobs. 2024-02-18 14:48:35 -08:00
Brian Smith fe5bbc1ee0 CI: Update versions of cargo-deny and cargo-audit 2023-12-05 18:23:34 -08:00
Brian Smith 8df253ec56 CI: Run tests on more targets. 2023-12-05 18:16:28 -08:00
Brian Smith 1f74481e02 CI: Remove unneeded workaround for no-longer-supported Rust version 2023-12-05 16:57:08 -08:00
Brian Smith 425ee4a7a0 CI: Update use of GitHub Actions Actions to sync with *ring*.
Update action/cache and action/checkout. Remove use of actions-rs.
2023-12-05 16:57:08 -08:00
Brian Smith cace8bb895 CI: Remove now-unneeded aarch64-apple-darwin workaround. 2023-12-05 16:57:08 -08:00
Brian Smith b16d543285 CI: Add aarch64-pc-windows-msvc (build only).
There are no runners in GitHub Actions so we can't run the tests, but at least
we can build them.
2023-10-08 11:03:31 -07:00
Brian Smith e7873ffe4b Restore MSRV to 1.61.0. 2023-10-08 10:31:11 -07:00
Brian Smith ba29bbfce2 Move rcgen-based tests to their own crate.
Remove the `rcgen` dev-dependency from the webpki crate.
2023-10-08 10:31:11 -07:00
Daniel McCarney 30a108e080 verify_cert: enforce maximum number of signatures.
Cherry-picked from e473ee1ecb335d8efa3d4ceb2feb369f46b125f2 and modified
by Brian Smith. The main modifications were:

1. Maintain API compatibility with webpki 0.22.0.
2. (In `build_chain_inner`), stop immediately on fatal error, without
   considering any more paths. The point of having such fatal errors
   is to fail ASAP and avoid unneeded work in the failure case.
3. The test uses rcgen which requires Rust 1.67.0 or later. (I don't
   think the non-test MSRV of webpki changes though.)

The original commit message is below:

Pathbuilding complexity can be quadratic, particularly when the set of
intermediates all have subjects matching a trust anchor. In these cases
we need to bound the number of expensive signature validation operations
that are performed to avoid a DoS on CPU usage.

This commit implements a simple maximum signature check limit inspired
by the approach taken in the Golang x509 package. No more than 100
signatures will be evaluated while pathbuilding. This limit works in
practice for Go when processing real world certificate chains and so
should be appropriate for our use case as well.
2023-08-30 14:08:00 -07:00
Brian Smith 8330c72930 CI: Use Ubuntu 22.04 on GitHub Actions & update Clippy config.
Get all GitHub Actions jobs passing again.

There are no Ubuntu 18.04 runners in GitHub Actions anymore, so use
22.04.

Update mk/* scripts to match what's in *ring*'s main branch;
some of these changes are required for Ubuntu 22.04. This also fixes
a typo in the invocation of `cargo clippy`.

Temporarily allow `clippy::explicit_auto_deref` to avoid source code
changes prior to the next 0.22.1 release. Tweak `dns_names_test.rs`
so that it doesn't trigger `clippy::octal_escapes` false positives.

Update `cargo deny` to the latest release and update deny.toml so
that the Unicode license will be accepted, matching *ring*'s
configuration.
2023-08-29 17:47:00 -07:00
Brian Smith 5060c2b1af CI/CD: Remove optimization for repository owner's PRs.
This optimization was carried over from *ring*'s CI configuration, but it
is less important for this project, so eliminate it.
2021-04-26 18:38:46 -07:00
Brian Smith 6e77bb953e CI/CD: Use my forks of the third-party GitHub actions.
This is a step towards implementing GitHub's GitHub Actions security
hardening advice.

```
$ sed -ri 's|(uses: +)([^/]+)/([^@])|\1briansmith/\2-\3|g' .github/workflows/ci.yml
$ grep "uses:" .github/workflows/ci.yml | sort | uniq
      - uses: briansmith/actions-cache@v2
      - uses: briansmith/actions-checkout@v2
      - uses: briansmith/actions-rs-toolchain@v1
      - uses: briansmith/codecov-codecov-action@v1
```
2021-04-26 18:24:31 -07:00
Brian Smith 96a2a0ff1d Sync GitHub permissions/token handling with what *ring* does. 2021-04-23 11:45:02 -07:00
Brian Smith de79b0a683 Update clippy configuration to match *ring*'s. 2021-04-20 18:18:12 -07:00
Brian Smith 6c334a2cf5 CI/CD: Add a `package` job. 2021-04-09 17:12:55 -07:00
Brian Smith 0c3bddc257 CI: Stop testing on Mac.
There is no Mac-specific code and the Mac runners are always slowing down the CI.
2021-02-18 12:29:58 -08:00
Brian Smith 6ef1fdfa30 Upgrade to cargo-deny 0.8.5.
Add `--locked` to work around
https://github.com/EmbarkStudios/cargo-deny/issues/331 and because it's
probably the more correct thing to do.
2021-02-17 00:22:28 -08:00
Brian Smith 2deeb79c74 Refactor features.
Test all feature configurations in CI.

Remove the `trust_anchor_utils` feature flag.

Guard all features that directly require allocation with a new `alloc` feature.
The RSA features will be handled separately.

Document the features. Tell docs.rs to document all features.

Adjust some tests so that tests are run in more configurations.
2021-01-07 00:36:28 -08:00
Brian Smith 3fccb4395e Make all features non-default; test default and --all-features configs in CI/CD. 2020-12-29 22:02:56 -08:00
Brian Smith 935e846fa7 CI/CD: Reduce the number of targets. 2020-12-29 18:05:10 -08:00
Brian Smith 0a3c5dd93d Increase Rust MSRV to 1.46. 2020-12-29 17:38:29 -08:00
Brian Smith 17512d129c Remove useless wasm32 jobs from CI/CD.
Unless/until we adapt all the tests to use wasm-bindgen-test, no tests are
actually run. In fact the jobs succeed even if there are missing symbols
from *ring*!
2020-12-29 16:43:13 -08:00
Brian Smith 5c7b94de8f CI/CD: Add `rustfmt` job.
This is imported verbatim from *ring*.
2020-12-29 13:09:55 -08:00
Brian Smith 922d67117f CI/CD: Update Clippy and MSRV testing from *ring*. 2020-12-07 21:35:10 -08:00
Brian Smith e1decfb811 CI/CD: Import clippy jobs from *ring*. 2020-12-07 17:57:08 -08:00
Brian Smith 2d32895b60 Add deny.toml with license clarification and add `cargo deny` job to CI/CD. 2020-12-01 21:04:59 -08:00
Brian Smith 8f8ef9e2f3 Documentation: Fix links to be compatible with Nightly rustdoc. 2020-12-01 20:15:24 -08:00
Brian Smith e12b2ec06e CI/CD: Update CI/CD to version used in *ring* main branch. 2020-12-01 19:44:03 -08:00
Brian Smith 7f67834712 CI/CD: Switch to GitHub Actions; expand build matrix. 2020-11-10 20:48:12 -08:00