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

Issue 174102: Enable SSLClientSocketTest unit tests on Mac OS X by implementing our own cer... (Closed)

Created:
11 years, 4 months ago by hawk
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, darin (slow to review), brettw, willchan no longer on Chromium, Ben Goodger (Google)
Visibility:
Public.

Description

Enable SSLClientSocketTest unit tests on Mac OS X by implementing our own certificate validation code. This gives us proper hostname matching, multiple error codes (e.g., before a certificate could be marked as expired or untrusted, but not both), revocation checking, and EV certificate checking. BUG=19286, 10910, 14733 TEST=https://www.paypal.com should work without warning. https://paypal.com should get a warning about a hostname mismatch. https://test-ssev.verisign.com:1443/test-SSEV-expired-verisign.html should give a warning about an expired certificate. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=24625

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 72

Patch Set 4 : '' #

Total comments: 1

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 21

Patch Set 7 : '' #

Total comments: 4

Patch Set 8 : '' #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+546 lines, -96 lines) Patch
M net/base/x509_certificate.h View 1 2 3 4 5 6 2 chunks +12 lines, -0 lines 2 comments Download
M net/base/x509_certificate.cc View 3 chunks +12 lines, -1 line 0 comments Download
M net/base/x509_certificate_mac.cc View 1 2 3 4 5 6 7 2 chunks +393 lines, -15 lines 6 comments Download
M net/socket/ssl_client_socket_mac.h View 1 2 3 4 5 6 3 chunks +10 lines, -2 lines 0 comments Download
M net/socket/ssl_client_socket_mac.cc View 1 2 3 4 5 6 6 chunks +63 lines, -44 lines 1 comment Download
M net/socket/ssl_client_socket_unittest.cc View 1 2 3 4 5 6 6 chunks +6 lines, -34 lines 0 comments Download
M net/socket/ssl_test_util.cc View 6 4 chunks +50 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
hawk
The Mac try failures in the SSL unit tests are expected -- they're due to ...
11 years, 4 months ago (2009-08-20 22:03:39 UTC) #1
Avi (use Gerrit)
Haven't fully read the cert code (need some aspirin before doing so) but have some ...
11 years, 4 months ago (2009-08-20 22:17:44 UTC) #2
wtc
Cool! I may not finish the review until tomorrow. Look forward to learning how all ...
11 years, 4 months ago (2009-08-20 23:45:54 UTC) #3
hawk
http://codereview.chromium.org/174102/diff/1014/22 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1014/22#newcode34 Line 34: // building a la SecTrustCreateWithCertificates() and friends. On ...
11 years, 4 months ago (2009-08-21 00:15:28 UTC) #4
Avi (use Gerrit)
On 2009/08/21 00:15:28, hawk wrote: > How about this: I can add a second form ...
11 years, 4 months ago (2009-08-21 13:38:11 UTC) #5
wtc
Chris, I have reviewed everything except X509Certificate::Verify. I will review that method next. Let me ...
11 years, 4 months ago (2009-08-21 21:38:23 UTC) #6
wtc
LGTM. You can upload a new Patch Set to address the issues, or do that ...
11 years, 4 months ago (2009-08-21 22:27:40 UTC) #7
hawk
http://codereview.chromium.org/174102/diff/1014/21 File net/base/x509_certificate.h (right): http://codereview.chromium.org/174102/diff/1014/21#newcode67 Line 67: typedef CFTypeRef OSCertHandle; On 2009/08/21 21:38:23, wtc wrote: ...
11 years, 4 months ago (2009-08-22 01:43:44 UTC) #8
Mark Mentovai
I would prefer that the tests used something like SSLSetTrustedRoots rather than requiring people to ...
11 years, 4 months ago (2009-08-23 04:15:22 UTC) #9
wtc
Mark is right. It's better to implement the equivalent of LoadTemporaryCert in src/net/socket/ssl_test_util.cc for the ...
11 years, 4 months ago (2009-08-24 19:52:34 UTC) #10
hawk
On 2009/08/24 19:52:34, wtc wrote: > Mark is right. It's better to implement the equivalent ...
11 years, 4 months ago (2009-08-24 20:16:33 UTC) #11
Avi (use Gerrit)
LGTM http://codereview.chromium.org/174102/diff/32/1024 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/32/1024#newcode577 Line 577: // it's defined in x509_certificate.h. We perform ...
11 years, 4 months ago (2009-08-24 20:55:48 UTC) #12
wtc
Hi Chris, I just realized that you may be waiting for me to review the ...
11 years, 4 months ago (2009-08-25 18:26:06 UTC) #13
wtc
Some more comments... http://codereview.chromium.org/174102/diff/1014/22 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1014/22#newcode86 Line 86: // Failure was due to ...
11 years, 4 months ago (2009-08-25 19:08:38 UTC) #14
hawk
http://codereview.chromium.org/174102/diff/1036/1041 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1036/1041#newcode438 Line 438: // revocation disabled (which is the default), then ...
11 years, 4 months ago (2009-08-25 21:12:48 UTC) #15
hawk
http://codereview.chromium.org/174102/diff/1014/22 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1014/22#newcode86 Line 86: // Failure was due to something Chromium doesn't ...
11 years, 4 months ago (2009-08-25 21:53:50 UTC) #16
wtc
Because this CL is very long, I'm starting to have code review fatigue :-) We ...
11 years, 4 months ago (2009-08-25 22:11:52 UTC) #17
wtc
http://codereview.chromium.org/174102/diff/1014/22 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1014/22#newcode86 Line 86: // Failure was due to something Chromium doesn't ...
11 years, 4 months ago (2009-08-25 22:15:13 UTC) #18
hawk
OK, hopefully this finished things up :-) Changes since the last time involve removing the ...
11 years, 3 months ago (2009-08-26 23:14:29 UTC) #19
Avi (use Gerrit)
http://codereview.chromium.org/174102/diff/1050/1054 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1050/1054#newcode448 Line 448: CFMutableArrayRef cert_array = CFArrayCreateMutable(kCFAllocatorDefault, 1, See comment below ...
11 years, 3 months ago (2009-08-26 23:27:53 UTC) #20
hawk
http://codereview.chromium.org/174102/diff/1050/1054 File net/base/x509_certificate_mac.cc (right): http://codereview.chromium.org/174102/diff/1050/1054#newcode448 Line 448: CFMutableArrayRef cert_array = CFArrayCreateMutable(kCFAllocatorDefault, 1, On 2009/08/26 23:27:54, ...
11 years, 3 months ago (2009-08-26 23:34:13 UTC) #21
Avi (use Gerrit)
The code LGTM. Re the commit comment, does your change to the test code obviate ...
11 years, 3 months ago (2009-08-26 23:49:05 UTC) #22
hawk
On 2009/08/26 23:49:05, Avi wrote: > The code LGTM. Re the commit comment, does your ...
11 years, 3 months ago (2009-08-27 00:00:11 UTC) #23
wtc
LGTM. Yes, please update the description of the CL before you check this in. You ...
11 years, 3 months ago (2009-08-27 00:14:18 UTC) #24
wtc
11 years, 3 months ago (2009-08-27 02:12:06 UTC) #25
Some comments on OverrideHostnameMismatch (re: http://crbug.com/20276).

http://codereview.chromium.org/174102/diff/53/1071
File net/base/x509_certificate_mac.cc (right):

http://codereview.chromium.org/174102/diff/53/1071#newcode156
Line 156: // even if the certificate contains 127.0.0.1 as one of its names.
Change "one of its names" to "the commonName in the subject field".

It's unknown whether we will still get a hostname mismatch if
our test server cert contains 127.0.0.1 as iPAddress in the
subjectAltName extension.

http://codereview.chromium.org/174102/diff/53/1071#newcode157
Line 157: // We, however, want to allow that behavior. SecTrustEvaluate()
Add something like "to be compatible with Windows CryptoAPI
and NSS".

http://codereview.chromium.org/174102/diff/53/1071#newcode580
Line 580: GetDNSNames(&names);
We should use only the common name in the subject field here.
GetDNSNames returns either the dNSName's in the
subjectAltName extension, or the commonName in the subject
field.  We shouldn't use the dNSName's in subjectAltName
here.

Powered by Google App Engine
This is Rietveld 408576698