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

cert: retain parsed Cert serial number. #61

Merged
merged 1 commit into from
May 11, 2023
Merged

cert: retain parsed Cert serial number. #61

merged 1 commit into from
May 11, 2023

Conversation

cpu
Copy link
Member

@cpu cpu commented May 5, 2023

Revocation checking based on certificate revocation lists (CRLs) is done by checking a validated CRL for an end-entity certificate's serial number. In preparation for implementing this we must retain certificate serial numbers when parsing, instead of discarding after reading.

We don't attempt to decode the raw serial number as a big integer since for the purpose of revocation checking we can match the ASN.1 encoded form without further processing.

Trust anchors will not be checked for revocation using CRLs so we do not augment the TrustAnchor representation and instead continue to discard the serial number when parsing TAs.

Relates to #56

Revocation checking based on certificate revocation lists (CRLs) is done
by checking a validated CRL for an end-entity certificate's serial
number. In preparation for implementing this we must retain certificate
serial numbers when parsing, instead of discarding after reading.

We don't attempt to decode the raw serial number as a big integer since
for the purpose of revocation checking we can match the ASN.1 encoded
form without further processing.
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Merging #61 (4e1a2c9) into main (9f0f95a) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #61      +/-   ##
==========================================
+ Coverage   93.74%   93.81%   +0.07%     
==========================================
  Files          13       13              
  Lines        2574     2604      +30     
==========================================
+ Hits         2413     2443      +30     
  Misses        161      161              
Impacted Files Coverage Δ
src/cert.rs 97.97% <100.00%> (+0.51%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@cpu cpu merged commit 64ebd60 into rustls:main May 11, 2023
@cpu cpu deleted the cpu-maintain-ee-serial branch May 11, 2023 14: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.

2 participants