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

Fix segfault in PKCS7 test #2025

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Fix segfault in PKCS7 test #2025

merged 2 commits into from
Dec 2, 2024

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Dec 2, 2024

Description of changes:

Fix Segfault in PKCS7 test

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.

@justsmth justsmth requested a review from a team as a code owner December 2, 2024 14:32
@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2024

Codecov Report

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

Project coverage is 78.67%. Comparing base (5982853) to head (8ddc899).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
crypto/pkcs7/pkcs7_test.cc 66.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2025      +/-   ##
==========================================
- Coverage   78.69%   78.67%   -0.02%     
==========================================
  Files         598      598              
  Lines      103326   103320       -6     
  Branches    14687    14687              
==========================================
- Hits        81310    81291      -19     
- Misses      21366    21378      +12     
- Partials      650      651       +1     

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

@@ -1814,7 +1812,7 @@ TEST(PKCS7Test, TestEnveloped) {
int decrypt_ok =
PKCS7_decrypt(p7.get(), rsa_pkey.get(), /*certs*/ nullptr, bio.get(),
/*flags*/ 0);
EXPECT_LE(sizeof(decrypted), BIO_pending(bio.get()));
EXPECT_LE(pt_len, BIO_pending(bio.get()));
OPENSSL_cleanse(decrypted, sizeof(decrypted));
// There's a fun edge case here for block ciphers using conventional PKCS#7
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// There's a fun edge case here for block ciphers using conventional PKCS#7
// There's a fun edge case here for block ciphers using conventional PKCS#1

crypto/pkcs7/pkcs7_test.cc Show resolved Hide resolved
@justsmth justsmth merged commit beb8846 into aws:main Dec 2, 2024
112 of 119 checks passed
@justsmth justsmth deleted the fix-pkcs7-test branch December 2, 2024 18:46
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.

4 participants