ASN1_STRING's representation is confusing. For specifically INTEGER and ENUMERATED, it lifts the sign bit into the type. While negative serial numbers aren't actually valid, we do accept them and test code sometimes uses these APIs to construct them, so amend https://boringssl-review.googlesource.com/c/boringssl/+/54286 to allow them. I've also switched the CRL one to an assert. On reflection, returning 0 for a CRL lookup is failing closed, so it seems better to just continue to accept the ASN1_STRING, even if it's the wrong type. Change-Id: I1e81a89700ef14407a78bd3798cdae28a80640cd Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/54525 Reviewed-by: Adam Langley <agl@google.com> Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com>chromium-5359
parent
04989786e9
commit
a61e7475d3
5 changed files with 19 additions and 8 deletions
Loading…
Reference in new issue