aws / aws-lc-rs

aws-lc-rs is a cryptographic library using AWS-LC for its cryptographic operations. The library strives to be API-compatible with the popular Rust library named ring.
Other
318 stars 49 forks source link

Safer pointer dereferences #505

Closed justsmth closed 2 months ago

justsmth commented 3 months ago

Description of changes:

Call-outs:

The uses of as_mut_unsafe are limited to calls made to the following AWS-LC functions:

These function only modify EVP_PKEY ref-count while holding a global lock.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 78.63636% with 47 lines in your changes missing coverage. Please review.

Project coverage is 92.52%. Comparing base (c358484) to head (8c8e522). Report is 78 commits behind head on main.

Files with missing lines Patch % Lines
aws-lc-rs/src/ec.rs 63.82% 0 Missing and 17 partials :warning:
aws-lc-rs/src/agreement.rs 80.00% 0 Missing and 5 partials :warning:
aws-lc-rs/src/rsa/key.rs 70.58% 0 Missing and 5 partials :warning:
aws-lc-rs/src/rsa/encryption/pkcs1.rs 66.66% 0 Missing and 4 partials :warning:
aws-lc-rs/src/kem.rs 72.72% 0 Missing and 3 partials :warning:
aws-lc-rs/src/rsa/signature.rs 57.14% 0 Missing and 3 partials :warning:
aws-lc-rs/src/ec/key_pair.rs 71.42% 0 Missing and 2 partials :warning:
aws-lc-rs/src/evp_pkey.rs 90.00% 2 Missing :warning:
aws-lc-rs/src/rsa/encoding.rs 60.00% 0 Missing and 2 partials :warning:
aws-lc-rs/src/rsa/encryption/oaep.rs 89.47% 0 Missing and 2 partials :warning:
... and 2 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #505 +/- ## ========================================== - Coverage 95.80% 92.52% -3.28% ========================================== Files 61 67 +6 Lines 8143 9277 +1134 Branches 0 9277 +9277 ========================================== + Hits 7801 8584 +783 - Misses 342 422 +80 - Partials 0 271 +271 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.