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

Issue 4653002: Cleanup X509CertificateMac style nits (Closed)

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

Description

Cleanup X509CertificateMac style nits and introduce a crypto library agnostic means of parsing certificate dates. In the process of addressing style issues, a bug was found in the date/time parsing routines used on Mac. Though not currently hit, it could lead to wild misrepresentation of the validity period for a certificate. Switch to using the routine used when using OpenSSL, which does things correctly. BUG=none TEST=existing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68322

Patch Set 1 #

Total comments: 9

Patch Set 2 : bulach feedback #

Total comments: 2

Patch Set 3 : wtc feedback #

Patch Set 4 : Rebase before commit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+125 lines, -116 lines) Patch
M net/base/x509_cert_types.h View 1 2 3 2 chunks +22 lines, -0 lines 0 comments Download
M net/base/x509_cert_types.cc View 1 2 3 2 chunks +48 lines, -0 lines 0 comments Download
M net/base/x509_certificate.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/base/x509_certificate_mac.cc View 1 2 3 14 chunks +48 lines, -68 lines 0 comments Download
M net/base/x509_openssl_util.cc View 1 2 3 3 chunks +6 lines, -47 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ryan Sleevi
joth/bulach: Would you be willing to take a look at this? I've repurposed the OpenSSL ...
10 years, 1 month ago (2010-11-08 01:50:12 UTC) #1
bulach
LGTM nice, great to see code being reused and fixing bugs at the same time ...
10 years, 1 month ago (2010-11-08 14:20:07 UTC) #2
Ryan Sleevi
Thanks for looking at this bulach. I've uploaded a new set addressing the things you ...
10 years, 1 month ago (2010-11-09 00:34:20 UTC) #3
bulach
thanks Ryan! feel free to land once the trybots are green, reply inline: On 2010/11/09 ...
10 years, 1 month ago (2010-11-09 14:08:30 UTC) #4
wtc
10 years, 1 month ago (2010-11-11 01:33:52 UTC) #5
rsleevi: as requested, I did NOT review this CL.  Just
two drive-by nit-picking comments.

http://codereview.chromium.org/4653002/diff/7001/net/base/x509_cert_types.h
File net/base/x509_cert_types.h (right):

http://codereview.chromium.org/4653002/diff/7001/net/base/x509_cert_types.h#n...
net/base/x509_cert_types.h:149: enum CertificateDateFormat {
Nit: probably should rename this enum CertDataFormat for
consistency with CERT_DATE_FORMAT_xxx.  Not sure what our
convention is.

http://codereview.chromium.org/4653002/diff/7001/net/base/x509_openssl_util.cc
File net/base/x509_openssl_util.cc (right):

http://codereview.chromium.org/4653002/diff/7001/net/base/x509_openssl_util.c...
net/base/x509_openssl_util.cc:67: : CERT_DATE_FORMAT_GENERALIZED_TIME;
Nit: we have a convention to break an expression at an operator.
So it would be better to format this statement as:
  CertificateDateFormat format = x509_time->type == V_ASN1_UTCTIME ?
      CERT_DATE_FORMAT_UTC_TIME : CERT_DATE_FORMAT_GENERALIZED_TIME;

Powered by Google App Engine
This is Rietveld 408576698