DescriptionFix handling of user and CA certificates on Android.
This patch fixes several things in the Android Chromium build:
- Fix two bugs that prevented the proper installation of keygen-ed
(public,private) key pairs on the system. The key data format was
invalid, due to the use of openssl's i2d_PrivateKey() and
i2d_PublicKey(), and the keys were incorrectly swapped in
the intent extras.
- Allow Chromium to install CA certificates as well as PKCS#12
keychains. The code only supported user certificates. This is
needed to match feature parity on Android with the native
browser. The reason why this is *not* enabled on other
platforms is to avoid denial-of-service issues, which are
not present on Android, because the CertInstaller will
always show a UI Dialog asking the user to name the
installed certificate.
- Fix the code used to install certificates on the system,
i.e. directly launch the CertInstaller activity, passing it
the appropriate bytes through an Intent.
The old code used SSLAddCertHandler, which forced Chromium
to perform minimal checks on the certificate's data validity.
These checks always failed due to CertDatabase::CheckUserCert()
failing in net/base/cert_database_openssl.cc due to the
fact that OpenSSLKeyStoreAndroid::FetchPrivateKeyStore()
is not implemented (and probably never will, since the
platform doesn't provide APIs to retrieve stored private
keys).
Instead, the CertInstaller is entirely in charge of verifying
the validity of certificates and display a UI toast (i.e. a
tiny fading non-interactive dialog) to indicate installation
success / failure.
Note: It is not possible to test this with the upstream Chromium
build for Android (neither the ContentShell or
ChromiumTestShell support the necessary features to do it).
The patch was tested by applying to the internal Chrome
for Android tree, and checking manually that everything
works as expected.
BUG=154006
Patch Set 1 #Messages
Total messages: 5 (0 generated)
|