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

Issue 12374020: Add Android support for SSL client authentication to the browser layer. (Closed)

Created:
7 years, 9 months ago by digit1
Modified:
7 years, 9 months ago
CC:
chromium-reviews
Base URL:
http://git.chromium.org/chromium/src.git@client-cert-test
Visibility:
Public.

Description

Add Android support for SSL client authentication to the browser layer. - Add an Android-specific implementation for the chrome::ShowSSLClientCertificateSelector() function that calls native APIs to let the user select a client certificate, and return the result back to the caller when it is received from the system dialog/application. BUG=166642, 172902, 134418 TEST=Manual testing with run-forwarded-test-server.sh (browser). Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=187507

Patch Set 1 #

Total comments: 16

Patch Set 2 : try something different #

Patch Set 3 : simple rebasing #

Patch Set 4 : a few more nits #

Total comments: 21

Patch Set 5 : optimizations #

Total comments: 11

Patch Set 6 : git cl try #

Patch Set 7 : ensure callback(NULL) is posted as a task in case of error. #

Patch Set 8 : Remove un-necessary refcounting #

Patch Set 9 : use base::Passed() to get rid of helper struct. #

Patch Set 10 : more simplification #

Total comments: 20

Patch Set 11 : nits #

Total comments: 14

Patch Set 12 : remove obsolete declarations in header. #

Total comments: 21

Patch Set 13 : address joth's nits #

Total comments: 4

Patch Set 14 : Address marcus' nits. #

Total comments: 2

Patch Set 15 : reorder Java sources properly in chrome_browser.gypi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+418 lines, -22 lines) Patch
A chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +168 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
A chrome/browser/ui/android/ssl_client_certificate_request.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/browser/ui/android/ssl_client_certificate_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +219 lines, -0 lines 0 comments Download
M chrome/browser/ui/android/ssl_client_certificate_selector.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -20 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 34 (0 generated)
digit1
This is an initial version of the patch that completes client certificate support for Android. ...
7 years, 9 months ago (2013-02-28 16:11:18 UTC) #1
bulach
thanks digit! quick drive-by, I'm very interested in the JNI problems you mention, let me ...
7 years, 9 months ago (2013-02-28 16:34:18 UTC) #2
digit
https://codereview.chromium.org/12374020/diff/1/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://codereview.chromium.org/12374020/diff/1/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:27: public class SSLClientCertificateRequest extends AsyncTask<Void, Void, Void> On 2013/02/28 ...
7 years, 9 months ago (2013-02-28 16:49:00 UTC) #3
digit
Note that the android bots are failing because they don't seem to first download/apply the ...
7 years, 9 months ago (2013-02-28 16:50:24 UTC) #4
Ryan Sleevi
"git try master" to try the full patch sequence. The git-cl commands typically take an ...
7 years, 9 months ago (2013-02-28 16:58:17 UTC) #5
bulach
ahn, I think I see the issue with the jni here, it's bridging too many ...
7 years, 9 months ago (2013-02-28 17:03:25 UTC) #6
Ryan Sleevi
https://codereview.chromium.org/12374020/diff/1/chrome/browser/ui/android/ssl_client_certificate_request.cc File chrome/browser/ui/android/ssl_client_certificate_request.cc (right): https://codereview.chromium.org/12374020/diff/1/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode49 chrome/browser/ui/android/ssl_client_certificate_request.cc:49: if (!callback_.is_null()) { Under what situations is this possible? ...
7 years, 9 months ago (2013-02-28 19:42:42 UTC) #7
digit1
https://codereview.chromium.org/12374020/diff/1/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://codereview.chromium.org/12374020/diff/1/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode1 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:1: // Copyright (c) 2012 The Chromium Authors. All rights ...
7 years, 9 months ago (2013-03-04 19:03:20 UTC) #8
digit1
So, I've tried to write a unit test for this recently, but this doesn't seem ...
7 years, 9 months ago (2013-03-04 19:27:24 UTC) #9
Ryan Sleevi
https://codereview.chromium.org/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_request.h File chrome/browser/ui/android/ssl_client_certificate_request.h (right): https://codereview.chromium.org/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_request.h#newcode86 chrome/browser/ui/android/ssl_client_certificate_request.h:86: jobject private_key_ref); Method naming: It's not at all clear ...
7 years, 9 months ago (2013-03-04 23:47:21 UTC) #10
digit1
https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_request.h File chrome/browser/ui/android/ssl_client_certificate_request.h (right): https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_request.h#newcode101 chrome/browser/ui/android/ssl_client_certificate_request.h:101: bool RegisterSSLClientCertificateRequestAndroid(JNIEnv* env); Most of similar functions that are ...
7 years, 9 months ago (2013-03-05 16:54:00 UTC) #11
Ryan Sleevi
https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_selector.cc File chrome/browser/ui/android/ssl_client_certificate_selector.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_selector.cc#newcode60 chrome/browser/ui/android/ssl_client_certificate_selector.cc:60: class CallbackGuard { On 2013/03/05 16:54:00, digit1 wrote: > ...
7 years, 9 months ago (2013-03-05 18:02:41 UTC) #12
digit1
https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_selector.cc File chrome/browser/ui/android/ssl_client_certificate_selector.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/3003/chrome/browser/ui/android/ssl_client_certificate_selector.cc#newcode60 chrome/browser/ui/android/ssl_client_certificate_selector.cc:60: class CallbackGuard { Ok, the error was due to ...
7 years, 9 months ago (2013-03-06 01:48:33 UTC) #13
Ryan Sleevi
https://chromiumcodereview.appspot.com/12374020/diff/17001/chrome/browser/ui/android/ssl_client_certificate_selector.cc File chrome/browser/ui/android/ssl_client_certificate_selector.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/17001/chrome/browser/ui/android/ssl_client_certificate_selector.cc#newcode89 chrome/browser/ui/android/ssl_client_certificate_selector.cc:89: ScopedEVP_PKEY private_key; On 2013/03/06 01:48:33, digit1 wrote: > I've ...
7 years, 9 months ago (2013-03-06 01:55:28 UTC) #14
digit1
https://chromiumcodereview.appspot.com/12374020/diff/17001/chrome/browser/ui/android/ssl_client_certificate_selector.cc File chrome/browser/ui/android/ssl_client_certificate_selector.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/17001/chrome/browser/ui/android/ssl_client_certificate_selector.cc#newcode89 chrome/browser/ui/android/ssl_client_certificate_selector.cc:89: ScopedEVP_PKEY private_key; thanks, this works and has been implemented ...
7 years, 9 months ago (2013-03-06 21:34:11 UTC) #15
Ryan Sleevi
Looking much much cleaner and much much better - thanks! https://chromiumcodereview.appspot.com/12374020/diff/38001/chrome/browser/ui/android/ssl_client_certificate_request.cc File chrome/browser/ui/android/ssl_client_certificate_request.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/38001/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode32 ...
7 years, 9 months ago (2013-03-06 21:50:43 UTC) #16
digit1
https://chromiumcodereview.appspot.com/12374020/diff/38001/chrome/browser/ui/android/ssl_client_certificate_request.cc File chrome/browser/ui/android/ssl_client_certificate_request.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/38001/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode32 chrome/browser/ui/android/ssl_client_certificate_request.cc:32: scoped_refptr<net::X509Certificate> client_cert, Ah I misunderstood what you meant. For ...
7 years, 9 months ago (2013-03-06 23:00:08 UTC) #17
Ryan Sleevi
https://chromiumcodereview.appspot.com/12374020/diff/44001/chrome/browser/ui/android/ssl_client_certificate_request.cc File chrome/browser/ui/android/ssl_client_certificate_request.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/44001/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode120 chrome/browser/ui/android/ssl_client_certificate_request.cc:120: // Ownership was transfered to Java. nit: speeling/transfered/transferred/ https://chromiumcodereview.appspot.com/12374020/diff/44001/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode122 ...
7 years, 9 months ago (2013-03-06 23:24:22 UTC) #18
digit1
https://chromiumcodereview.appspot.com/12374020/diff/44001/chrome/browser/ui/android/ssl_client_certificate_request.cc File chrome/browser/ui/android/ssl_client_certificate_request.cc (right): https://chromiumcodereview.appspot.com/12374020/diff/44001/chrome/browser/ui/android/ssl_client_certificate_request.cc#newcode120 chrome/browser/ui/android/ssl_client_certificate_request.cc:120: // Ownership was transfered to Java. On 2013/03/06 23:24:22, ...
7 years, 9 months ago (2013-03-07 15:38:20 UTC) #19
digit1
ping?
7 years, 9 months ago (2013-03-08 18:39:13 UTC) #20
Ryan Sleevi
LGTM, but someone will need to review the Java side.
7 years, 9 months ago (2013-03-08 18:46:05 UTC) #21
digit1
On 2013/03/08 18:46:05, Ryan Sleevi wrote: > LGTM, but someone will need to review the ...
7 years, 9 months ago (2013-03-08 21:33:50 UTC) #22
joth
lgtm comments are just nits. https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:27: public class SSLClientCertificateRequest extends ...
7 years, 9 months ago (2013-03-09 01:17:22 UTC) #23
digit
7 years, 9 months ago (2013-03-09 02:50:38 UTC) #24
bulach
lgtm, just nits, thanks! https://chromiumcodereview.appspot.com/12374020/diff/57001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://chromiumcodereview.appspot.com/12374020/diff/57001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode120 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:120: * @param request_id The unique ...
7 years, 9 months ago (2013-03-11 11:20:09 UTC) #25
digit1
https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:27: public class SSLClientCertificateRequest extends AsyncTask<Void, Void, Void> On 2013/03/09 ...
7 years, 9 months ago (2013-03-11 21:41:21 UTC) #26
digit1
I just added yfriedman and jochen as suggested owners. Guys, could you have a look ...
7 years, 9 months ago (2013-03-11 21:42:45 UTC) #27
jochen (gone - plz use gerrit)
gypi changes lgtm https://chromiumcodereview.appspot.com/12374020/diff/39011/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): https://chromiumcodereview.appspot.com/12374020/diff/39011/chrome/chrome_browser.gypi#newcode3135 chrome/chrome_browser.gypi:3135: 'android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java', usually we sort A-Z < ...
7 years, 9 months ago (2013-03-11 21:48:06 UTC) #28
joth
https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java File chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java (right): https://chromiumcodereview.appspot.com/12374020/diff/47001/chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java#newcode30 chrome/android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java:30: static final String TAG = "SSLClientCertificateRequest"; On 2013/03/11 21:41:21, ...
7 years, 9 months ago (2013-03-11 21:56:13 UTC) #29
digit
https://chromiumcodereview.appspot.com/12374020/diff/39011/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): https://chromiumcodereview.appspot.com/12374020/diff/39011/chrome/chrome_browser.gypi#newcode3135 chrome/chrome_browser.gypi:3135: 'android/java/src/org/chromium/chrome/browser/SSLClientCertificateRequest.java', Thanks, I've reordered the whole block since only ...
7 years, 9 months ago (2013-03-11 21:57:12 UTC) #30
Yaron
gypi changes lgtm. Was that all you wanted me to look at?
7 years, 9 months ago (2013-03-11 23:43:23 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/digit@chromium.org/12374020/70001
7 years, 9 months ago (2013-03-12 00:54:02 UTC) #32
digit1
Yes yaron, the other files have pretty much been covered by Ryan, Marcus and Jonathan. ...
7 years, 9 months ago (2013-03-12 01:11:01 UTC) #33
commit-bot: I haz the power
7 years, 9 months ago (2013-03-12 05:44:56 UTC) #34
Message was sent while issue was closed.
Change committed as 187507

Powered by Google App Engine
This is Rietveld 408576698