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
Tim Düsterhus
b481381e91
Fix typo in Rustdoc for verify_signature()
2021-12-13 22:06:46 -08:00
Brian Smith
97507d40ab
Appease the newest stable Clippy.
2021-12-13 21:44:26 -08:00
Brian Smith
18cda8a5e3
Sync mk/ with *ring*.
2021-05-11 14:16:16 -07:00
Fabio Valentini
6e037e3de0
update base64 dev-dependency to 0.13
2021-05-07 15:30:49 -07:00
Brian Smith
17d9189981
Temporarily undo some renaming that can't be alised, to get back webpki 0.21.4 compat.
...
Make it easier to maintain support for Rustls 0.19.1 by restoring the webpki main branch to a
state compatible with webpki 0.21.4.
2021-05-07 15:12:11 -07:00
Brian Smith
de7fb02d2e
Restore `Time::try_from`.
2021-05-07 15:12:11 -07:00
Brian Smith
5d5c71095c
Add more backward-compatibility aliases.
2021-05-07 15:12:11 -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
2baa7f8ebc
Remove `EndEntityCert::verify_is_valid_for_at_least_one_dns_name`.
...
This doesn't really do the thing we hoped it would do, and it's dead weight.
2021-04-22 13:19:33 -07:00
Brian Smith
650341c29f
Add `DnsName` trait tests.
2021-04-22 13:11:12 -07:00
Brian Smith
b31b588621
Add tests for `DnsNameRef` traits.
2021-04-22 13:11:12 -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
2208a22acd
Use `impl Trait` instead of an unnecessarily-named parameter.
2021-04-10 22:05:07 -07:00
Brian Smith
6c334a2cf5
CI/CD: Add a `package` job.
2021-04-09 17:12:55 -07:00
Brian Smith
0b7cbf2d32
0.22.0.
2021-04-09 16:15:55 -07:00
Brian Smith
cd59614740
Rename internal names to conform to Rust conventions.
2021-04-09 15:58:41 -07:00
Brian Smith
5b67fb92da
Rename error variants according to Rust conventions.
2021-04-09 15:58:41 -07:00
Brian Smith
2cb889b7c5
Rename `TrustAnchor::from_cert_der` to `TrustAnchor::try_from_cert_der`.
2021-04-09 15:58:41 -07:00
Brian Smith
bc6893f6ef
Use Rust naming conventions for abbreviations.
2021-04-09 15:58:41 -07:00
Brian Smith
5fd730eb18
Disable some clippy pedantic lints.
2021-02-18 15:58:12 -08:00
Brian Smith
092393e2ef
Time: Use `Self` more.
2021-02-18 13:56:23 -08:00
Brian Smith
4942c65d97
Tweak `AllowWildcards` to pass `clippy::needless-pass-by-value`.
2021-02-18 13:50:37 -08:00
Brian Smith
628b8d6d6f
Remove `der::Value::tlv`.
...
This was added as a prerequisite for a feature that hasn't landed yet, but it
is currently unused. Further, it is using deprecated features of `untrusted`.
Remove it. We'll add it back if/when we need it, probably with a different
implementation.
2021-02-18 13:30:21 -08:00
Brian Smith
1d5f4bd649
Avoid using `as` to convert `u8` to `usize`.
...
Enable the clippy lint for this.
2021-02-18 12:30:28 -08:00
Brian Smith
0789a90d94
Avoid using `as` for conversions from `Tag` to `u8`.
...
*ring* added a safer way to do this conversion a while back.
2021-02-18 12:30:28 -08: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
ead26ed429
Style: use `impl Trait` instead of explicitly-named type parameters.
2021-02-18 10:54:16 -08:00
Stiopa Koltsov
ba54ede055
Error::UnsupportedCertWithoutExtensions
...
Better error than `BadDER` when certificate is generated incorrectly.
I agree to license my contributions to each file under the terms given at the top of each file I changed.
2021-02-17 14:39:43 -08:00
Stiopa Koltsov
1364e7a902
Error::UnsupportedCertVersion instead of BadDER on certificate v1
...
I agree to license my contributions to each file under the terms given at the top of each file I changed.
2021-02-17 14:37:35 -08:00
Brian Smith
07306a64a3
Remove `nested_mut`.
...
`nested_mut` does what `nested` does. It was written when the author was
confused about how the closure traits work.
2021-02-17 00:53:17 -08:00
Stiopa Koltsov
db1f0d1d64
Fix clippy warnings
...
I agree to license my contributions to each file under the terms given at the top of each file I changed.
2021-02-17 00:24:12 -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
082a74427e
Remove `trust_anchor_util::generate_code_for_trust_anchors`.
...
This was intended to be used by things like webpki-roots, but
webpki-roots is not using it and the implementation was not good, and
not tested.
2021-02-04 13:37:55 -08:00
Brian Smith
e8d040cefa
Rename `TrustAnchor::from_x509_der` to `from_cert_der`.
2021-02-04 13:09:28 -08:00
Brian Smith
f29589c46e
Correct spelling typo in `Error::CAUsedAsEndEntity` doc comment.
2021-02-04 13:04:56 -08:00
Brian Smith
69d546c898
Fix the build when the `alloc` feature is enabled.
2021-01-25 22:48:00 -08:00
Brian Smith
5d6f260215
Rename main module file to `lib.rs` from `webpki.rs`.
2021-01-25 21:49:15 -08:00
Brian Smith
b4b0afdf4e
Move X.509-to-TrustAnchor parsing to `TrustAnchor`.
...
`trust_anchor_util` will now contain only the code generation functionality.
2021-01-25 21:49:15 -08:00
Brian Smith
d9c4e625e0
Move trust anchor types to their own submodule.
2021-01-25 21:49:15 -08:00
Brian Smith
13a50e7dfb
Move `EndEntityCert` to its own module.
2021-01-25 21:49:15 -08:00
Brian Smith
b96d6c58da
Combine `pub use`s.
2021-01-25 21:49:15 -08:00
Brian Smith
9cf9f45923
Don't use libstd, and specifically avoid file I/O, in tests.
...
Previously, the `signed_data` tests could not be run on platforms without libstd.
Now they can be run as long as liballoc is available.
2021-01-13 15:57:41 -08:00
Brian Smith
9cb456584c
Allow more APIs to be used with just the `alloc` feature enabled.
2021-01-13 14:27:51 -08:00
Brian Smith
f8f2f871aa
Use `SystemTimeError` instead of `ring::error::Unspecified` in `Time` construction.
...
Time construction doesn't involve *ring* at all so avoid involving *ring*.
2021-01-13 14:27:17 -08:00