rusticata / x509-parser

X.509 parser written in pure Rust. Fast, zero-copy, safe.
Other
206 stars 67 forks source link

revocation_list: use correct OID for CRL number. #144

Closed cpu closed 1 year ago

cpu commented 1 year ago

Previously the CertificateRevocationList's crl_number fn used the wrong OID when iterating CRL extensions looking for the CRL number extension. It should be using OID_X509_EXT_CRL_NUMBER (id-ce 20) but was using OID_X509_EXT_BASIC_CONSTRAINTS (id-ce 19). This results in yielding None even for CRLs that do have a CRL number ext.

This commit fixes the mismatched OID and properly yields the CRL number for CRLs with this extension present.

chifflier commented 1 year ago

This looks like a typical copy/paste error :) Applied, thanks!