New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620005 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Expect-Staple does not verify signatures or check issuer

Project Member Reported by dadrian@google.com, Jun 14 2016

Issue description

The current in-progress implementation of Expect-Staple has two issues with how it determines if the stapled response is for the correct certificate:

1. Signatures are not validated. This is blocking on https://codereview.chromium.org/1849773002/

2. Issuer name is not checked. Comparing anything about the certificate to the OCSP SingleResponse requires access to DER-encoded issuer name and issuer public key. The |X509Certificate| object does not currently expose these, short of reencoding an |OSCertHandle| back to DER.

The current implementation only checks serial number.
 
I'm not sure I understand the comments regarding #2. X509Certificate shouldn't expose that sort of info, and GetDEREncoded is meant to be the "get the DER" approach (and is meant to be as toll-free as possible). So to check issuer name, the 'right' thing is to use the ASN1 utilities with the output from GetDEREncoded and check (with the caveat of delegated OCSP responders)
Project Member

Comment 2 by sheriffbot@chromium.org, Jun 14 2016

Labels: Hotlist-Google

Comment 3 by dadrian@google.com, Jun 15 2016

Status: Assigned (was: Untriaged)
I guess I wasn't particularly clear on #2. It's not so much a bug, simply a statement of "we're not here yet". The code will have to get an OSCertHandle from the X509Certificate, convert it to DER, and then re-parse the DER using the code in net/cert/internal, in order to extract DER-encoded issuer and public key.

This is essentially just a list of things that, for simplicity, won't be in the initial Expect-Staple CL.

Comment 4 by dadrian@google.com, Jul 27 2016

Cc: davidcad...@gmail.com
Owner: est...@chromium.org
What is the status/goal of the CheckOCSP() code in cert/cert_verify_proc.cc?

Is it only for histogram logging, or was the desire to handle stapled OCSP independently of the underlying CertVerifyProc?

As it stands right now it is a partial implementation which doesn't do any signature verification.

I would like to pull this out and move it to a complete implementation for the built-in verifier.
> Is it only for histogram logging, or was the desire to handle stapled OCSP independently of the underlying CertVerifyProc?

Somewhere in-between; it was for the Expect-Staple reporting experiment: https://docs.google.com/document/d/1aISglJIIwglcOAhqNfK-2vtQl-_dWAapc-VLDh-9-BE/edit

For that use case, the main goal was to help sites uncover cases where responses weren't stapled or were expired, so while David (my intern) intended to implement signature verification, it wasn't high priority and he ran out of time.

I would like to deprecate Expect-Staple (possibly replacing it with a URL-keyed metric) because we don't have bandwidth to maintain/expand it and I think we've learned what we're going to learn from it. So from my perspective you can feel free to do whatever's convenient with that code.
Thanks for the info!
Hi, I'm the (former) intern. My intention was to use the built-in OCSP parsing and verification code that svaldez@ was working on. At the time, the CL with signature verification had not landed yet, and so we skipped it when I was working on Expect-Staple.
Owner: eroman@chromium.org
Status: Fixed (was: Assigned)
<3

Sign in to add a comment