Commit Graph

35 Commits

Author SHA1 Message Date
Brian Smith 9613e5d115 Sync mk/{cargo.sh,install-build-tools.sh} with *ring*.
In particular, LLVM/Clang 18 so that the coverage jobs succeed after
Rust Nightly upgraded to LLVM 18.
2024-02-18 14:46:52 -08:00
Brian Smith de56edcf40 mk: Sync with *ring*. 2023-12-05 16:25:43 -08:00
Brian Smith 7e0731a016 NFC: Remove `too_many_arguments` exception from clippy.sh. 2023-09-30 11:31:21 -07:00
Brian Smith 4a71d475e6 NFC: Address Clippy `explicit_auto_deref`. 2023-08-30 17:04:56 -07:00
Brian Smith 177c39eee5 NFC: Address Clippy `clone_on_copy`. 2023-08-30 17:04:56 -07:00
Brian Smith 3e8d10d72c CI: Clean up Clippy configuration.
None of these lints are triggered.
2023-08-30 17:04:56 -07:00
Brian Smith ae7a99f281 NFC: Address Clippy `useless_asref`. 2023-08-30 17:04:56 -07:00
Brian Smith 6d409c9039 NFC: Address Clippy `redundant_closure`. 2023-08-30 17:04:56 -07:00
Brian Smith ca2472ec5f NFC: Address Clippy `octal_escapes` lint. 2023-08-30 17:04:56 -07:00
Brian Smith d16bafbba4 NFC: Address Clippy `needless_borrow` complaints. 2023-08-30 17:04:56 -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 0cd0b31beb Revert main branch crate contents to the 0.22.0 release contents.
Reset the crate contents (sources, tests, etc.)
to what they were at that commit, while retaining the newer CI
configuration.

The changes since the 0.22.0 release were primarily intended to
accomplish two goals:

* Fix and improve the GitHub Actions configuration.
* Prepare a 0.21.5 release that was backward compatible with 0.21.4
  but which also contained the improvements that were in 0.22.0.

0.21.5 was never released and will not be released. Therefore all
of the noise to facilitate the 0.21.5 release can just be deleted,
as long as we leave the CI changes that are necessary for GitHub
Actions to work correctly now.

The exact commands I used were:

```
git checkout \
    6c334a2cf5 \
    -- \
    Cargo.toml \
    LICENSE \
    README.md \
    src \
    tests \
    third-party
git rm src/trust_anchor_util.rs
```

Commit 6c334a2cf5 was the commit from
which 0.22.0 was released. It is confusing because the commit
immediately prior, 0b7cbf2d32, has
commit message "0.22.0". It appears that I merged the "0.22.0"
commit, expecting to `cargo publish` from that commit, but then
`cargo publish` failed. Then I added
6c334a2cf5 to fix `cargo publish`
and did the `cargo publish` from that commit. That's why I added
the `package` CI step at that time, to prevent this confusing
situation from happening again.

`trust_anchor_utils.rs` was not in 0.22.0; the `git checkout` didn't
delete it, so I had to do it separately.

I left the tests added subsequent to 0.22.0 in `tests/` (e.g.
`name_tests.rs`) since those tests pass with the 0.22.0 sources too.

Unfortunately, this requires disabling a bunch of Clippy lints, to
avoid modifying the contents from 0.22.0.

(I know it is confusing. It took me a while to figure it out myself
today.)
2023-08-30 08:31:51 -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 18cda8a5e3 Sync mk/ with *ring*. 2021-05-11 14:16:16 -07:00
Brian Smith 81bd1e3fbf Add missing docs and check for missing docs during build. 2021-04-20 18:32:56 -07:00
Brian Smith 279933295a Move clippy configuration out of `lib.rs` and into clippy.sh.
Reduce sensitivity to the set of clippy lints over time.
2021-04-20 18:18:12 -07:00
Brian Smith 12ff6d2daa Reduce number of allowed clippy violations. 2021-04-20 18:18:12 -07:00
Brian Smith de79b0a683 Update clippy configuration to match *ring*'s. 2021-04-20 18:18:12 -07: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
Brian Smith d26035bbe7 Always use current "stable" Rust.
Update AppVeyor script to match *ring*.
2019-03-22 10:31:41 -10:00
Brian Smith 103c6ab22b Test --no-default-features --features=trust_anchor_util config. 2017-08-27 10:24:29 -10:00
Brian Smith 2df22b0fa1 Test no-default-features and all-features modes. 2017-08-27 10:19:45 -10:00
Brian Smith 370f5cbc02 Fix Travis CI. 2017-08-27 01:02:23 -10:00
Brian Smith 827d085673 Conform to draft Rust API guidelines regarding "std" feature name.
See https://rust-lang-nursery.github.io/api-guidelines/naming.html#feature-names-are-free-of-placeholder-words-c-feature.
2017-08-18 10:46:35 -10:00
Joseph Birr-Pixton 7f38a1dbc7 Expose our own time type `webpki::Time`
You can make one of these using `webpki::Time::from_seconds_from_unix_epoch`.

- Move ASN1 conversion functions to "calendar.rs", and add some tests.
- The new feature `use_std` adds `from<std::time::SystemTime>` to `webpki::Time`.
- Fixate time in tests/integration to prevent future expiry.
- Add a library-external test of `use_std` feature.
- Run tests with `use_std` and without.
2017-08-18 10:40:46 -10:00
Brian Smith ae546843cc Build with `-vv` instead of just `--verbose`. 2017-03-18 18:06:06 -10:00
Brian Smith 981ec15f36 Sync Travis CI config with *ring* to turn off clang builds.
Clang's apt repo is temporarily unavailable, so all the Clang builds
were failing.
2016-06-05 16:34:26 -10:00
Brian Smith a157f83b0d Sync Appveyor script with *ring*.
Integrate the Yasm download and and performance improvements that were
done in *ring*.
2016-05-10 11:21:10 -10:00
Brian Smith 99c2670d27 Sync with *ring*'s mk/update-travis-yml.py. 2016-05-06 18:16:24 -10:00
Brian Smith f184ab3639 Sync CI configuration with *ring*'s. 2016-01-05 22:12:32 -10:00
Brian Smith d74e35f441 Sync Travis CI config with *ring*. 2015-12-06 11:30:53 -10:00
Brian Smith 39b2c63654 Sync CI configuration with *ring* & update to Rust 1.4. 2015-10-29 12:42:48 -10:00
Corey Farwell 00eba2a7db Simplify travis config, only specify language:rust once.
Closes #5.
2015-08-27 20:13:07 -07:00
Brian Smith 52c0623a87 Add Travis & Appveyor. 2015-08-27 10:23:38 -07:00