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

Issue 365503007: Insulate the legacy Android client auth code from OpenSSL ABI changes. (Closed)

Created:
6 years, 5 months ago by davidben
Modified:
6 years, 5 months ago
Reviewers:
Yaron, agl
CC:
chromium-reviews, cbentzel+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Insulate the legacy Android client auth code from OpenSSL ABI changes. The current implementation assumes the Android system OpenSSL and our copy have compatible ABIs. This will be a problem when switching to BoringSSL which has already changed from ABIs. Moreoever, it's already slightly off now as any globals (error queue and locks) have different instances between the two. Rework the code to never mix the two ABIs. We replicate the subset of OpenSSL ABI we care about and use it to find the rsa_priv_enc implementation. This is then mapped to Chromium OpenSSL via the custom RSA_METHOD. In addition, because we cannot safely increase reference counts, retain references to Java wrappers where appropriate in lieu of the C structures. Also fix AndroidKeyStore unit tests on 4.1; they broke after an overzealous NOTREACHED() in r278305. BUG=389414 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282713

Patch Set 1 #

Patch Set 2 : Style #

Patch Set 3 : Fix unit tests on 4.1 #

Patch Set 4 : |bad emacs M-q. No cookie for you. #

Total comments: 4

Patch Set 5 : yfriedman comments #

Total comments: 6

Patch Set 6 : agl comments #

Patch Set 7 : Add a TODO. #

Patch Set 8 : Rebase #

Patch Set 9 : Mismerge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -65 lines) Patch
M net/android/java/src/org/chromium/net/AndroidKeyStore.java View 1 chunk +13 lines, -0 lines 0 comments Download
M net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java View 1 2 3 4 5 chunks +78 lines, -11 lines 0 comments Download
M net/android/java/src/org/chromium/net/RemoteAndroidKeyStore.java View 1 chunk +7 lines, -0 lines 0 comments Download
M net/android/keystore.h View 1 2 3 4 5 2 chunks +18 lines, -10 lines 0 comments Download
M net/android/keystore.cc View 2 chunks +13 lines, -2 lines 0 comments Download
M net/android/keystore_openssl.cc View 1 2 3 4 5 6 7 8 10 chunks +95 lines, -42 lines 0 comments Download
A net/android/legacy_openssl.h View 1 1 chunk +98 lines, -0 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
davidben
Tested manually with MIT certificates on Android 4.1.2 (Galaxy Nexus) and Android 4.4.2 (Nexus 4). ...
6 years, 5 months ago (2014-07-01 19:33:27 UTC) #1
Yaron
the java-y parts lgtm but i'm less familiar with the openssl and android-internal parts https://codereview.chromium.org/365503007/diff/60001/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java ...
6 years, 5 months ago (2014-07-08 20:01:27 UTC) #2
davidben
https://codereview.chromium.org/365503007/diff/60001/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java File net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java (right): https://codereview.chromium.org/365503007/diff/60001/net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java#newcode272 net/android/java/src/org/chromium/net/DefaultAndroidKeyStore.java:272: return 0; On 2014/07/08 20:01:27, Yaron wrote: > return ...
6 years, 5 months ago (2014-07-08 20:20:49 UTC) #3
Yaron
On Tue, Jul 8, 2014 at 1:20 PM, <davidben@chromium.org> wrote: > > https://codereview.chromium.org/365503007/diff/60001/net/ > android/java/src/org/chromium/net/DefaultAndroidKeyStore.java ...
6 years, 5 months ago (2014-07-08 20:38:09 UTC) #4
agl
https://codereview.chromium.org/365503007/diff/80001/net/android/keystore.h File net/android/keystore.h (right): https://codereview.chromium.org/365503007/diff/80001/net/android/keystore.h#newcode111 net/android/keystore.h:111: // Returns a JNI reference to the OpenSSLEngine object ...
6 years, 5 months ago (2014-07-10 16:33:44 UTC) #5
davidben
https://codereview.chromium.org/365503007/diff/80001/net/android/keystore.h File net/android/keystore.h (right): https://codereview.chromium.org/365503007/diff/80001/net/android/keystore.h#newcode111 net/android/keystore.h:111: // Returns a JNI reference to the OpenSSLEngine object ...
6 years, 5 months ago (2014-07-10 21:47:07 UTC) #6
agl
LGTM
6 years, 5 months ago (2014-07-11 19:11:37 UTC) #7
davidben
The CQ bit was checked by davidben@chromium.org
6 years, 5 months ago (2014-07-11 19:13:09 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/davidben@chromium.org/365503007/160001
6 years, 5 months ago (2014-07-11 19:14:14 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 22:08:23 UTC) #10
Message was sent while issue was closed.
Change committed as 282713

Powered by Google App Engine
This is Rietveld 408576698