Commit Graph

12 Commits

Author SHA1 Message Date
Joseph Birr-Pixton 327444fdb8 Expose FIPS "service indicator"
This means a `ClientConfig` and `ServerConfig` can be asked whether it
is in fips mode, and it answers by asking the same of all its
constituent cryptography.
2023-12-07 13:45:27 +00:00
Jorge Aparicio 8188a5b291 fix warnings in -default +ring build 2023-11-24 15:14:19 +00:00
Joseph Birr-Pixton b4680e6a00 Remove `ring_shim::digest_output_len`
aws-lc-rs 1.5 tracked this API change.
2023-11-21 09:58:03 +00:00
Joseph Birr-Pixton b5c428d223 Fix HMAC_SHA512 dead-code warning
It isn't possible to write a cfg expression that says when this
is used, because it would differ over the two instantiations.

Note that HMAC-SHA512 is only actually used to run test vectors posted
to the tlswg mailing list by some random in 2009.
2023-11-09 16:18:11 +00:00
Joseph Birr-Pixton aaf21d1cdf Allow optional use of aws-lc-rs
Provide shims for limited number of places where ring 0.17 and
aws-lc-rs (ring 0.16-era) APIs have diverged.  This is a
short-term fix, as they are likely to diverge more over time.
Eventually we'll have to stop sharing the code like this.

For unit-like tests, export a `test_provider` alias that resolves
to a provider module, for use in these tests.

This resolves to:

- *ring* if cfg(feature = "ring"), else
- aws-lc-rs if cfg(feature = "aws_lc_rs"), else
- is absent
2023-11-09 16:18:11 +00:00
Joseph Birr-Pixton 7aa87e98a4 Make modules in crypto::ring reusable
They take the dependency on ring via `super::ring_like`, which
means they can be reused against a different, ring-compatible
crate.
2023-11-09 16:18:11 +00:00
Joe Birr-Pixton 23151675dc Inline and privatise conversion into crypto::hmac::Tag 2023-10-18 09:23:03 +00:00
Jorge Aparicio 5427a4d6e9 use `core::prelude` instead of `std::prelude` 2023-10-10 15:53:23 +00:00
Dirkjan Ochtman 8e64ed10b9 Upgrade to ring 0.17 2023-10-06 15:24:29 +00:00
Joseph Birr-Pixton bf816e4b76 Move over to using hashing provider and hkdf 2023-08-25 14:01:04 +00:00
Dirkjan Ochtman 484e3771f2 Use clippy for test and example code, too 2023-08-25 13:15:04 +00:00
Joseph Birr-Pixton c994e8267d Add crypto::hmac interface and use it for TLS1.2 PRF 2023-08-15 13:11:12 +00:00