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

Issue 4184004: Add support for certificate name checking (Closed)

Created:
10 years, 1 month ago by joth
Modified:
9 years, 7 months ago
Reviewers:
wtc, agl, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr., agayev
Visibility:
Public.

Description

Add support for certificate name checking There's nothing OpenSSL specific about this implementation, other than this is the only platform that does not already supply an implementation of this method. BUG=60719 TEST=net_unittests --gtest_filter=X509CertificateCertificateNameVerifyTest.* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66263

Patch Set 1 #

Patch Set 2 : Add tests #

Patch Set 3 : Tidy comments #

Patch Set 4 : 2 more test cases #

Total comments: 16

Patch Set 5 : IDN and case-sensitive tests #

Patch Set 6 : agl comments. remove GURL dependency #

Patch Set 7 : Minor docs update #

Total comments: 6

Patch Set 8 : wtc comments, plus moved method to x509_openssl_util #

Total comments: 20

Patch Set 9 : wtc & rsleevi comments #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -3 lines) Patch
M net/base/x509_certificate_openssl.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -1 line 2 comments Download
M net/base/x509_openssl_util.h View 8 3 chunks +9 lines, -1 line 0 comments Download
M net/base/x509_openssl_util.cc View 8 3 chunks +110 lines, -1 line 6 comments Download
A net/base/x509_openssl_util_unittest.cc View 8 1 chunk +102 lines, -0 lines 0 comments Download
M net/net.gyp View 8 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
joth
Wasn't so bad in the end. Please double check my test expectations though (and suggest ...
10 years, 1 month ago (2010-10-28 12:17:47 UTC) #1
Ryan Sleevi
I haven't had a chance to look in depth yet, but a few comments. The ...
10 years, 1 month ago (2010-10-28 13:16:11 UTC) #2
joth
Many thanks for the pointers to background discussion -- at this point this is just ...
10 years, 1 month ago (2010-10-28 13:33:08 UTC) #3
agl
NACK because of the use of googleurl. http://codereview.chromium.org/4184004/diff/7001/8001 File net/base/x509_certificate.h (right): http://codereview.chromium.org/4184004/diff/7001/8001#newcode235 net/base/x509_certificate.h:235: // Verifies ...
10 years, 1 month ago (2010-10-28 14:30:13 UTC) #4
Ryan Sleevi
On 2010/10/28 13:33:08, joth wrote: > Many thanks for the pointers to background discussion -- ...
10 years, 1 month ago (2010-10-28 15:36:46 UTC) #5
joth
On 28 October 2010 16:36, <rsleevi@chromium.org> wrote: > On 2010/10/28 13:33:08, joth wrote: > >> ...
10 years, 1 month ago (2010-10-28 15:50:54 UTC) #6
joth
Think I've addressed everything. Does the use of RegistryControlledDomainService::GetRegistryLength() seem OK? Again, this is only ...
10 years, 1 month ago (2010-10-28 15:57:24 UTC) #7
wtc
I didn't review the code. Just two high-level comments. http://codereview.chromium.org/4184004/diff/28001/7002 File net/base/x509_certificate.h (right): http://codereview.chromium.org/4184004/diff/28001/7002#newcode239 net/base/x509_certificate.h:239: ...
10 years, 1 month ago (2010-10-28 19:08:59 UTC) #8
wtc
One more high-level comment: http://codereview.chromium.org/4184004/diff/28001/7002 File net/base/x509_certificate.h (right): http://codereview.chromium.org/4184004/diff/28001/7002#newcode179 net/base/x509_certificate.h:179: void GetDNSNames(std::vector<std::string>* dns_names) const; The ...
10 years, 1 month ago (2010-10-28 19:20:21 UTC) #9
joth
Thinking about this, it seems far cleaner to put this in the openssl_util file. I'll ...
10 years, 1 month ago (2010-10-29 10:56:37 UTC) #10
joth
Updated with the verify certname method in x509_openssl_util, which means no changes needed in any ...
10 years, 1 month ago (2010-10-29 13:20:17 UTC) #11
wtc
joth: I'm not sure if you're waiting for my review. I reviewed Patch Set 8, ...
10 years, 1 month ago (2010-11-03 00:29:49 UTC) #12
Ryan Sleevi
@wtc: I believe your/agl's feedback is desired on at least part of this. There was ...
10 years, 1 month ago (2010-11-03 03:42:21 UTC) #13
wtc
On 2010/11/03 03:42:21, rsleevi wrote: > > The question posed here echoed the question posed ...
10 years, 1 month ago (2010-11-03 18:46:08 UTC) #14
joth
Thanks for the comments wtc, and that nice summary of the status rsleevi. I'm tending ...
10 years, 1 month ago (2010-11-03 18:57:17 UTC) #15
Ryan Sleevi
On 2010/11/03 18:46:08, wtc wrote: > On 2010/11/03 03:42:21, rsleevi wrote: > > > > ...
10 years, 1 month ago (2010-11-03 22:35:04 UTC) #16
joth
Just got catch to follow up. As discussed with wtc & agl, I have trimmed ...
10 years, 1 month ago (2010-11-12 18:55:22 UTC) #17
agl
LGTM http://codereview.chromium.org/4184004/diff/44001/net/base/x509_openssl_util.cc File net/base/x509_openssl_util.cc (right): http://codereview.chromium.org/4184004/diff/44001/net/base/x509_openssl_util.cc#newcode131 net/base/x509_openssl_util.cc:131: it != hostname.end(); ++it) { indentation looks to ...
10 years, 1 month ago (2010-11-15 17:55:04 UTC) #18
wtc
joth: I merely checked the API and the issue that GetDNSNames performs a lossy conversion. ...
10 years, 1 month ago (2010-11-16 00:15:21 UTC) #19
joth
10 years, 1 month ago (2010-11-16 14:01:10 UTC) #20
Thanks both, I've landed this. I'll look into what's needed to get it working
with the test server.

http://codereview.chromium.org/4184004/diff/44001/net/base/x509_certificate_o...
File net/base/x509_certificate_openssl.cc (right):

http://codereview.chromium.org/4184004/diff/44001/net/base/x509_certificate_o...
net/base/x509_certificate_openssl.cc:108: if (name->type == GEN_DNS) {
On 2010/11/16 00:15:21, wtc wrote:
> The ParseSubjectAltNames function only includes DNS names,
> so it will also need to be enhanced to include IP addresses.

Yes. Hopefully my TODO on line 382, plus details in the linked bug, should cover
this.

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

http://codereview.chromium.org/4184004/diff/44001/net/base/x509_openssl_util....
net/base/x509_openssl_util.cc:131: it != hostname.end(); ++it) {
On 2010/11/15 17:55:04, agl wrote:
> indentation looks to be off by a space here.

Done.

http://codereview.chromium.org/4184004/diff/44001/net/base/x509_openssl_util....
net/base/x509_openssl_util.cc:198: // the wildcard to appear anywhere in the
leftmost  label, rather than
On 2010/11/15 17:55:04, agl wrote:
> double space here.

Done.

http://codereview.chromium.org/4184004/diff/44001/net/base/x509_openssl_util....
net/base/x509_openssl_util.cc:199: // requiring it to be the only character. See
On 2010/11/15 17:55:04, agl wrote:
> 'See' what?

Done.
See http://crbug.com/60719

Powered by Google App Engine
This is Rietveld 408576698