Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gcm: Split FFI helpers into a separate submodule. #2103

Merged
merged 1 commit into from
Jun 15, 2024
Merged

Conversation

briansmith
Copy link
Owner

@briansmith briansmith commented Jun 14, 2024

Make it clearer which types are used in the FFI and start separating the (unsafe) code that's used only for the FFI from the (safe) code used in the Rust implementation.

git difftool HEAD^1:src/aead/gcm.rs src/aead/gcm/ffi.rs

Copy link

codecov bot commented Jun 14, 2024

Codecov Report

Attention: Patch coverage is 98.85057% with 1 line in your changes missing coverage. Please review.

Project coverage is 97.25%. Comparing base (e3593b4) to head (972e236).
Report is 2 commits behind head on main.

Files Patch % Lines
src/aead/gcm/ffi.rs 98.38% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2103      +/-   ##
==========================================
+ Coverage   97.24%   97.25%   +0.01%     
==========================================
  Files         143      144       +1     
  Lines       20144    20135       -9     
  Branches      228      228              
==========================================
- Hits        19589    19583       -6     
  Misses        527      527              
+ Partials       28       25       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Make it clearer which types are used in the FFI and start separating
the (unsafe) code that's used only for the FFI from the (safe) code
used in the Rust implementation.

`git difftool HEAD^1:src/aead/gcm.rs src/aead/gcm/ffi.rs`
let input_len = match NonZeroUsize::new(input.len()) {
Some(len) => len,
None => {
return;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently unreachable (before and after this commit), but it might not always be unreachable, so we'll leave it as-is. In the future we should write a test.

@briansmith briansmith merged commit 8d748be into main Jun 15, 2024
152 checks passed
@briansmith briansmith deleted the b/gcm-split branch June 15, 2024 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant