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

Issue 8470012: When accessing certificate fields/extensions on OS X, only parse what is needed. (Closed)

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

Description

On OS X, when accessing a certificate field (subject, issuer, extension, etc), rather than parsing the entire certificate and converting all known fields to their CSSM equivalents, just parse the desired field. Additionally, when parsing multiple fields, instead of parsing the certificate multiple times, parse it once and cache the internal parse results. While the cached handle cannot reliably be used across threads, it can reduce the amount of parsing for the common case, where constructing an X509Certificate on OS X requires parsing three fields. BUG=101231 TEST=net_unittests passes on OS X 10.5, 10.6, and 10.7 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=112636

Patch Set 1 #

Total comments: 12

Patch Set 2 : Rebased #

Patch Set 3 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -154 lines) Patch
M net/base/x509_certificate_mac.cc View 1 2 6 chunks +231 lines, -154 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Ryan Sleevi
wtc: I'm guessing this goes to you because of its low-level CSSM-ness. This CL keeps ...
9 years, 1 month ago (2011-11-20 07:29:19 UTC) #1
mattm
On 2011/11/20 07:29:19, Ryan Sleevi wrote: > wtc: I'm guessing this goes to you because ...
9 years, 1 month ago (2011-11-22 02:59:33 UTC) #2
Ryan Sleevi
On 2011/11/22 02:59:33, mattm wrote: > Thanks Ryan, I only have 10.6. If you have ...
9 years, 1 month ago (2011-11-22 03:25:27 UTC) #3
wtc
LGTM. Excellent work. http://codereview.chromium.org/8470012/diff/1/net/base/x509_certificate_mac.cc File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/8470012/diff/1/net/base/x509_certificate_mac.cc#newcode159 net/base/x509_certificate_mac.cc:159: if (!field_ || !oid_ || field_->Length ...
9 years ago (2011-12-02 01:17:01 UTC) #4
Ryan Sleevi
http://codereview.chromium.org/8470012/diff/1/net/base/x509_certificate_mac.cc File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/8470012/diff/1/net/base/x509_certificate_mac.cc#newcode159 net/base/x509_certificate_mac.cc:159: if (!field_ || !oid_ || field_->Length < sizeof(T)) On ...
9 years ago (2011-12-02 03:14:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/8470012/9001
9 years ago (2011-12-02 03:16:29 UTC) #6
commit-bot: I haz the power
9 years ago (2011-12-02 04:30:56 UTC) #7
Change committed as 112636

Powered by Google App Engine
This is Rietveld 408576698