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 X509V3_EXT_METHODs for ocsp nonce extension #1603

Merged
merged 4 commits into from
May 23, 2024

Conversation

samuel40791765
Copy link
Contributor

@samuel40791765 samuel40791765 commented May 23, 2024

Issues:

Resolves V1391929042

Description of changes:

This backports more of the changes done in 736a283 to reintroduce the "old-style" X509V3_EXT_METHODs.
Although we're reintroducing the methods we discourage using, I've added checks to ensure that these are only used with NID_id_pkix_OCSP_Nonce. The assertion in X509V3_EXT_add is kept so that we continue to only allow |ASN1_ITEM|-based extensions for consumers that add their own.

Call-outs:

I've abstracted out the freeing logic to x509v3_ext_free_with_method. This used to be all over the place.

Testing:

New test case added

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.

@samuel40791765 samuel40791765 requested a review from a team as a code owner May 23, 2024 18:33
@codecov-commenter
Copy link

codecov-commenter commented May 23, 2024

Codecov Report

Attention: Patch coverage is 73.46939% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 77.92%. Comparing base (fc06ecb) to head (d875335).
Report is 2 commits behind head on main.

Files Patch % Lines
crypto/x509/v3_lib.c 72.72% 9 Missing ⚠️
crypto/x509/v3_conf.c 33.33% 2 Missing ⚠️
crypto/x509/v3_prn.c 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1603      +/-   ##
==========================================
+ Coverage   77.90%   77.92%   +0.02%     
==========================================
  Files         561      561              
  Lines       94632    94669      +37     
  Branches    13604    13616      +12     
==========================================
+ Hits        73725    73773      +48     
+ Misses      20315    20303      -12     
- Partials      592      593       +1     

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

crypto/x509/v3_lib.c Outdated Show resolved Hide resolved
crypto/x509/v3_conf.c Show resolved Hide resolved
@samuel40791765 samuel40791765 enabled auto-merge (squash) May 23, 2024 23:04
@samuel40791765 samuel40791765 merged commit 308dca9 into aws:main May 23, 2024
79 of 81 checks passed
@samuel40791765 samuel40791765 deleted the fix-ocsp branch May 23, 2024 23:09
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