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

Implement PKCS7_dataInit and PKCS7_dataFinal #1816

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

WillChilds-Klein
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein commented Aug 29, 2024

Notes

This PR adds a few new functions, most notably PKCS7_dataInit and PKCS7_dataFinal as they're used by ruby to prepare/finalize BIO chains for reading from or writing to a PKCS7 object. Their usage is documented here in pkcs7.h.

Testing

  • new unit tests
  • more comprehensive testing exercising dataInit/dataFinal for encryption/signing operations can be found here. those tests will be added in the next 2 PRs.

Coverage in this PR itself is a bit low due to the cipher-related initialization in PKCS7_dataInit and signature-related finalization in PKCS7_dataFinal. Coverage for these sections of code will be added in the next 2 PRs.


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
Copy link

codecov-commenter commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 68.40659% with 115 lines in your changes missing coverage. Please review.

Project coverage is 78.74%. Comparing base (c9d48a6) to head (aa9a47c).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
crypto/pkcs7/pkcs7.c 64.06% 115 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1816      +/-   ##
==========================================
- Coverage   78.79%   78.74%   -0.05%     
==========================================
  Files         590      590              
  Lines      101506   101870     +364     
  Branches    14401    14448      +47     
==========================================
+ Hits        79979    80220     +241     
- Misses      20891    21014     +123     
  Partials      636      636              

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

@WillChilds-Klein WillChilds-Klein force-pushed the pkcs7-bio-data-init-final branch 3 times, most recently from 23e4d39 to 1b0c84d Compare September 5, 2024 19:57
@WillChilds-Klein WillChilds-Klein force-pushed the pkcs7-bio-data-init-final branch 5 times, most recently from a4a9d39 to f7c09cf Compare November 11, 2024 17:40
@WillChilds-Klein WillChilds-Klein changed the title [DRAFT] Implement PKCS7_dataInit and PKCS7_dataFinal Implement PKCS7_dataInit and PKCS7_dataFinal Nov 11, 2024
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.

2 participants