DescriptionFix client certificate regressions on Android < 4.2
https://codereview.chromium.org/166143002 refactored the code to use the
AndroidPrivateKey wrapper class rather than Java's PrivateKey directly,
but this one line of code was not updated. As a result, the test will
always fail and client certificates won't work on Android versions prior
to 4.2 (this is a compatibility code path, which is probably why it
wasn't caught in testing or review).
In addition, while https://codereview.chromium.org/182933002 updated the
code to to fix 64-bit compilation issues, it missed the point that this
is compatibility code meant to run only on earlier versions of Android
that aren't 64-bit safe to begin with. As a result, a method called via
reflection will return an unexpected integer instead of a long, causing
the code to fail (even in 32-bit mode).
Fix by conservatively casting the return value through Number instead,
which will work with both int and long. (The earlier Android versions
that this code is targeting are still not 64-bit safe, but the
compatibility code should not cause any compile issues.)
Investigation credit goes out to kimn@opera.com.
BUG=360406
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=265531
Patch Set 1 #
Messages
Total messages: 13 (0 generated)
|