Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Issue 9699043: net: fallback to online revocation checks for EV status when CRLSet has expired. (Closed)

Created:
8 years, 9 months ago by agl
Modified:
8 years, 9 months ago
Reviewers:
wtc, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Ryan Sleevi
Visibility:
Public.

Description

net: fallback to online revocation checks for EV status when CRLSet has expired. After this change our CRLSet logic is: * If we have a fresh CRLSet then we don't do online revocation checks unless the user has configured them. (It can be configured either via the settings UI, or with the EnableOnlineRevocationChecks policy option.) * If we don't have a CRLSet, or if it has expired, and we're trying EV verification, then we require a positive online revocation check in order to show the EV badge. An invalid revocation check reply will prevent the EV badge, but not hard-fail the whole verification. BUG=none TEST=net_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=127757

Patch Set 1 #

Patch Set 2 : ... #

Total comments: 16

Patch Set 3 : ... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+234 lines, -58 lines) Patch
M net/base/crl_set.h View 4 chunks +10 lines, -6 lines 0 comments Download
M net/base/crl_set.cc View 3 chunks +19 lines, -16 lines 0 comments Download
M net/base/crl_set_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M net/base/x509_certificate.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/base/x509_certificate.cc View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M net/base/x509_certificate_mac.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M net/base/x509_certificate_nss.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M net/base/x509_certificate_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download
M net/base/x509_certificate_win.cc View 5 chunks +11 lines, -7 lines 0 comments Download
M net/data/ssl/certificates/README View 1 chunk +3 lines, -0 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 5 chunks +173 lines, -22 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
agl
8 years, 9 months ago (2012-03-14 19:23:14 UTC) #1
wtc
Patch set 2 LGTM. rsleevi: could you doublecheck this? Thanks. https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certificate.cc File net/base/x509_certificate.cc (right): https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certificate.cc#newcode611 ...
8 years, 9 months ago (2012-03-16 00:33:10 UTC) #2
wtc
https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certificate_win.cc File net/base/x509_certificate_win.cc (left): https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certificate_win.cc#oldcode501 net/base/x509_certificate_win.cc:501: case CRLSet::CRL_SET_EXPIRED: On 2012/03/16 00:33:10, wtc wrote: > > ...
8 years, 9 months ago (2012-03-16 00:34:13 UTC) #3
Ryan Sleevi
Just a few nits - more suggestions than hard requests for changes. LGTM. https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/crl_set.cc File ...
8 years, 9 months ago (2012-03-16 00:50:52 UTC) #4
agl
8 years, 9 months ago (2012-03-20 20:02:19 UTC) #5
https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/crl_set.cc
File net/base/crl_set.cc (right):

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/crl_set.cc#...
net/base/crl_set.cc:571: if (not_after_ == 0)
On 2012/03/16 00:50:52, Ryan Sleevi wrote:
> is 0 some magic value for "never expires" ? I notice it was in the original
code
> at line 548, but perhaps this is non-obvious, especially since not_after_ will
> generally be zero-initialized when creating a new CRLSet.

Yes, this is for backwards compatibility was CRLSets that were generated prior
to the addition of the NotAfter field.

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certif...
File net/base/x509_certificate.cc (right):

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certif...
net/base/x509_certificate.cc:611: // the online check fails, we wont show the EV
status.
On 2012/03/16 00:33:10, wtc wrote:
> Nit: wont => won't

Done

> It may be a good idea to document that we could optimize and
> only enable online checks if the cert is likely to be an EV
> cert, but since it is uncommon to have an expired CRLSet,
> it is fine to not optimize.

Done.

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certif...
net/base/x509_certificate.cc:612: if ((flags & VERIFY_EV_CERT) && (!crl_set ||
crl_set->IsExpired()))
On 2012/03/16 00:50:52, Ryan Sleevi wrote:
> Comment nit: In past reviews, I've been dinged for using first person like
"we",

Have de-we'ed the comment.

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certif...
File net/base/x509_certificate_mac.cc (right):

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/base/x509_certif...
net/base/x509_certificate_mac.cc:690: bool CheckRevocationWithCRLSet(CFArrayRef
chain, CRLSet* crl_set) {
On 2012/03/16 00:33:10, wtc wrote:
> 
> Just curious: why does this function return bool here and in
> x509_certificate_win.cc, but return CRLSetResult in
> x509_certificate_nss.cc?

Probably a mistake that I should clean up. Originally some plans included more
granular processing in the x509_certificate_*.cc files and NSS was the first one
that I wrote. In the end, a bool was sufficient however.

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/url_request/url_...
File net/url_request/url_request_unittest.cc (right):

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/url_request/url_...
net/url_request/url_request_unittest.cc:1398: context_->Init();
On 2012/03/16 00:33:10, wtc wrote:
> InitContext(context_) and context_->Init() sound the same to
> me :-)

Changed to SetupContext.

https://chromiumcodereview.appspot.com/9699043/diff/2001/net/url_request/url_...
net/url_request/url_request_unittest.cc:1614: class
RevCheckedDisabledSSLConfigService : public SSLConfigService {
On 2012/03/16 00:50:52, Ryan Sleevi wrote:
> nit: Just create a single SSLConfigService that takes the flags as parameters?

Done. Makes more sense now that there are three of them.

Powered by Google App Engine
This is Rietveld 408576698