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

Issue 652137: Mac: implement <keygen> support, including adding generated cert to the Keychain. (Closed)

Created:
10 years, 10 months ago by Jens Alfke
Modified:
9 years, 7 months ago
Reviewers:
wtc
CC:
chromium-reviews_googlegroups.com, brettw+cc_chromium.org, ben+cc_chromium.org, John Grabowski, pam+watch_chromium.org, Paweł Hajdan Jr., darin-cc_chromium.org, jam+cc_chromium.org
Visibility:
Public.

Description

Mac: implement <keygen> support, including adding generated cert to the Keychain. BUG=34607 TEST=KeygenHandlerTest.SmokeTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=40387

Patch Set 1 #

Patch Set 2 : A few tweaks I found self-reviewing the patch #

Patch Set 3 : Removed Apple open-source code. #

Total comments: 80

Patch Set 4 : Responding to review feedback. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+687 lines, -102 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_dispatcher_host.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/resource_message_filter.cc View 1 2 3 1 chunk +17 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/x509_user_cert_resource_handler.cc View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
A chrome/browser/ssl/ssl_add_cert_handler.h View 1 2 3 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/browser/ssl/ssl_add_cert_handler.cc View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
A chrome/browser/ssl/ssl_add_cert_handler_mac.mm View 1 chunk +88 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/base/cert_database.h View 1 chunk +7 lines, -3 lines 0 comments Download
M net/base/cert_database_mac.cc View 1 2 3 1 chunk +40 lines, -6 lines 0 comments Download
M net/base/cert_database_nss.cc View 1 2 3 4 chunks +17 lines, -26 lines 0 comments Download
M net/base/cert_database_win.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M net/base/keygen_handler.h View 1 2 3 1 chunk +22 lines, -4 lines 0 comments Download
M net/base/keygen_handler_mac.cc View 1 2 3 1 chunk +235 lines, -8 lines 1 comment Download
M net/base/keygen_handler_nss.cc View 1 2 3 6 chunks +11 lines, -30 lines 0 comments Download
A net/base/keygen_handler_unittest.cc View 1 2 3 1 chunk +56 lines, -0 lines 0 comments Download
M net/base/keygen_handler_win.cc View 1 chunk +0 lines, -7 lines 0 comments Download
M net/base/net_error_list.h View 2 chunks +7 lines, -1 line 2 comments Download
M net/base/x509_certificate_nss.cc View 1 chunk +10 lines, -5 lines 0 comments Download
M net/net.gyp View 1 2 3 2 chunks +7 lines, -2 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Jens Alfke
Important note: I can't actually commit this until I get legal approval for the newly ...
10 years, 10 months ago (2010-02-23 20:09:58 UTC) #1
Jens Alfke
I removed the Apple code (which was really just four struct declarations).
10 years, 10 months ago (2010-02-23 22:28:03 UTC) #2
wtc
LGTM. Please note the important issues below, marked with "BUG", "UI DESIGN ISSUE", and "API ...
10 years, 10 months ago (2010-02-25 00:53:34 UTC) #3
Jens Alfke
Thanks for the feedback. It probably wasn't necessary for me to add a URLRequest delegate ...
10 years, 9 months ago (2010-02-26 19:13:40 UTC) #4
wtc
Hi Jens, I responded to your comments below. I'll review the new Patch Set 4 ...
10 years, 9 months ago (2010-03-01 21:52:34 UTC) #5
wtc
10 years, 9 months ago (2010-03-01 23:05:40 UTC) #6
LGTM.  Here are my comments on Patch Set 4.

http://codereview.chromium.org/652137/diff/4010/4025
File net/base/keygen_handler_mac.cc (right):

http://codereview.chromium.org/652137/diff/4010/4025#newcode142
net/base/keygen_handler_mac.cc:142: spkac.signature_algorithm.algorithm =
CSSMOID_MD5WithRSA;
Can we use SHA1WithRSA instead of MD5WithRSA?  (This needs to
match what you specify on line 241 below.)

I know this comes from the NSS-based implementation and is
specified in http://dev.w3.org/html5/spec/Overview.html#the-keygen-element
but not in https://developer.mozilla.org/En/HTML/HTML_Extensions/KEYGEN_Tag

For now, let's just add a TODO comment and link to the
Mozilla bug I just filed:
https://bugzilla.mozilla.org/show_bug.cgi?id=549460

http://codereview.chromium.org/652137/diff/4010/4029
File net/base/net_error_list.h (right):

http://codereview.chromium.org/652137/diff/4010/4029#newcode194
net/base/net_error_list.h:194: // NOTE: It's unclear how this differs from
CERT_INVALID. For consistency,
Nit: CERT_INVALID => ERR_CERT_INVALID

http://codereview.chromium.org/652137/diff/4010/4029#newcode233
net/base/net_error_list.h:233: NET_ERROR(CERT_NO_PRIVATE_KEY, -209)
This is not a certificate error (the certificate itself is
good).  So we need to add this error code elsewhere.
(The error code ranges are documented at line 8.)

Let's add it to the -5xx range, and name it
NO_PRIVATE_KEY_FOR_CERT.

Please remember to change CERT_END back to -209.

Powered by Google App Engine
This is Rietveld 408576698