New issue
Advanced search Search tips

Issue 634509 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 410574



Sign in to add a comment

[PKI library] Don't treat trust anchors as certificates during path building

Project Member Reported by eroman@chromium.org, Aug 4 2016

Issue description

Or phrased differently, split out trust anchor constraints as separate structures during validation/path building.

Right now for convenience we treat trust anchors as just another certificate in the path, and fully process its basic constraints, expiration, key usage, etc.

(Mea culpa!)

For compatible operation we should instead treat trust anchors as in RFC 5280 -- a named SPKI with associated anchor constraints.

For more details on anchor constraints and how they apply during validation see RFC 5937.

This shouldn't change much -- we will still save a canonical certificate for trust anchors (can relax that later), however any additional constraints encoded in that certificate are not necessarily processed.

Note: The current consumer of the library, Cast, _does_ have anchor constraints, so when transitioning the API we must ensure it continues using the constraints encoded in its self-signed root certificate.
 
Description: Show this description
Cc: mattm@chromium.org
Owner: eroman@chromium.org
Status: Assigned (was: Available)
Started looking at this.

FYI Matt, since it may well conflict with changes you are making to trust store interface.
Status: Started (was: Assigned)
https://codereview.chromium.org/2225493003/
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/96739b74597dba66dce7104b3f058028950d2ce1

commit 96739b74597dba66dce7104b3f058028950d2ce1
Author: eroman <eroman@chromium.org>
Date: Thu Aug 11 02:33:41 2016

Don't treat trust anchors as certificates during path building.

This clarifies the abstraction for trust anchors, and treats them as
described in RFC 5280 -- as being just an SPKI + name.

Previously anchors were passed around as certificates, wheres this CL:

* Introduces TrustAnchor to describe trust anchor for path validation/building
* Introduces CertPath to describe trust anchor + certificates
* TrustAnchor may optionally have an associated certificate, however properties of that certificate are not processed during validation.
* TrustAnchor will be extended in a follow-up CL ( issue 635200 ) to support describing anchor constraints

BUG= 634509 ,410574

Review-Url: https://codereview.chromium.org/2225493003
Cr-Commit-Position: refs/heads/master@{#411231}

[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/components/cast_certificate/cast_cert_validator.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/components/cast_certificate/cast_crl.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/components/cast_certificate/cast_crl.h
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/components/cast_certificate/cast_crl_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/path_builder.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/path_builder.h
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/path_builder_pkits_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/path_builder_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/path_builder_verify_certificate_chain_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/trust_store.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/trust_store.h
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/verify_certificate_chain.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/verify_certificate_chain.h
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/verify_certificate_chain_pkits_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/verify_certificate_chain_typed_unittest.h
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/cert/internal/verify_certificate_chain_unittest.cc
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/data/verify_certificate_chain_unittest/expired-root.pem
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/data/verify_certificate_chain_unittest/generate-expired-root.py
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/data/verify_certificate_chain_unittest/generate-violates-pathlen-1-root.py
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/data/verify_certificate_chain_unittest/violates-pathlen-1-root.pem
[modify] https://crrev.com/96739b74597dba66dce7104b3f058028950d2ce1/net/tools/cert_verify_tool/verify_using_path_builder.cc

Comment 5 by eroman@chromium.org, Aug 11 2016

Status: Fixed (was: Started)

Sign in to add a comment