Make KeyFactory.translateKey for OpenSSL keys a no-op.

There's no need for the OpenSSL-backed KeyFactory.translateKey to
create copies of Key instances which are already backed by OpenSSL.

Change-Id: I9411d774453251973703ba9de4fd413fac4b2183
NativeCrypto: adjust BasicConstraints check

OpenSSL checks KeyUsage for "Certificate Signing" when checking for a
CA, but Java just specifies that the getBasicConstraints call only looks
at the BasicConstraints itself.

Bug: 8488314
Change-Id: I072cd2e9f1a9295a717f7587817149200113c65f
Merge "NativeCrypto: adjust BasicConstraints check"
NativeCrypto: adjust thrown exceptions

Should be throwing CertificateException when InputStream is null.

Sometimes OpenSSL doesn't push an error onto the list when PEM encoding
fails. This can be seen with the call to PEM_read_bio_X509 with
hyts_badpem.cer  Throw a generic RuntimeException instead.

Bug: 8488314
Change-Id: Iee3b240e3def076f67e15980897be87ff3bf5e6c
NativeCrypto: add missing native function

This should be covered by NativeCryptoTest as well but there was a missing
native function that caused
tests.security.cert.CertificateCertificateRepTest#testReadResolve
to fail.

There was also a missing OpenSSL error catch that made the same test
fail.

Bug: 8488314
Change-Id: Ic8bca86ab221a478e303c8e94662f28d279c19b6
Merge "NativeCrypto: adjust thrown exceptions"
Merge "NativeCrypto: add missing native function"
Switch to OkHttp as URL's preferred HTTP implementation.

Change-Id: Id724b75dd78b68ed00f5db4989c4070896996ec0
Don't install APK files with unsupported General Purpose Bit Flag bits.

Bug: 8476102
Change-Id: I764c2aec944558129c8ac04ee0593fb3de82870e
Merge "Don't install APK files with unsupported General Purpose Bit Flag bits."
Merge "Switch to OkHttp as URL's preferred HTTP implementation."
Improve the Locale.getISO3Country/getISO3Language documentation and behavior.

Bug: 8541850
Change-Id: I8843aeee25eeefe0f6d5e16dd359ba78ef5a01cc
Merge "Improve the Locale.getISO3Country/getISO3Language documentation and behavior."
Move the external/apache-harmony/math tests into libcore.

Change-Id: Ic4acfcf8553e0108e6ad127afa2745bb551acba3
NativeCrypto: catch another RSA error

Also add a generic fallback for certificate verification when the specific
type of error is unknown.

Bug: 8550441
Change-Id: Iee44be55c698a4a33450b569c12199747fdbcc49
Merge "Make KeyFactory.translateKey for OpenSSL keys a no-op."
Merge "NativeCrypto: catch another RSA error"
Merge "Move the external/apache-harmony/math tests into libcore."
Check the EE's eKU extension field, if present.

BUG=https://code.google.com/p/chromium/issues/detail?id=167607 and
https://b.corp.google.com/issue?id=7920492

Change-Id: Ib917c3a4a8ea6a12f685c44056aa44aa414d45e6
Merge "Check the EE's eKU extension field, if present."