Skip to content

reject unsuccessful ocsp responses that carry response bytes - #15901

Open
jmestwa-coder wants to merge 1 commit into
pyca:mainfrom
jmestwa-coder:ocsp-unsuccessful-response-bytes
Open

jmestwa-coder wants to merge 1 commit into
pyca:mainfrom
jmestwa-coder:ocsp-unsuccessful-response-bytes

Conversation

@jmestwa-coder

Copy link
Copy Markdown
Contributor

load_der_ocsp_response rejects a successful response with no responseBytes, but not the reverse:

  • a tryLater, unauthorized or other non-successful status that still carries a BasicOCSPResponse loads fine
  • every BasicResponse property then returns the embedded data instead of raising ValueError as documented, e.g. resp-sha256.der with the status flipped to tryLater reports TRY_LATER and certificate_status GOOD
  • RFC 6960 4.2.1 only allows responseBytes with a successful status, and responseStatus sits outside the signed data

Now raises ValueError at load time, with a regression test and a changelog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant