am c375a9cf: Use long instead of int for address in DirectByteBuffer constructor

* commit 'c375a9cfd6ca0f557a4343a14f6c4115a1f20207':
  Use long instead of int for address in DirectByteBuffer constructor
Merge "NativeCrypto: make generation bug compatible"
NativeCrypto: make generation bug compatible

generateCertPath, generateCertificates, and generateCRLs have slightly
different behavior on null input. Match the RI and (apparently) previous
BC behavior.

(cherry picked from commit ce0f579c5e7c384d2a3734e7327ce3a859ba52e3)

Bug: 8488314
Change-Id: I6d0f96829798c83b46201a74cd409ef828e0adb2
am 699ec7b4: NativeCrypto: make generation bug compatible

* commit '699ec7b45e1648fb53333df33889971230058233':
  NativeCrypto: make generation bug compatible
am 5e482c8d: Merge "NativeCrypto: make generation bug compatible"

* commit '5e482c8dfbf5665107cd4f2542f12933191c7f03':
  NativeCrypto: make generation bug compatible
Merge branch 'jb-mr2-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/libcore into jb-mr2-dev-plus-aosp
Merge "Build Caliper microbenchmark tests.Also fix the URLConnectionBenchmark tests to use the external/mockwebserver." into jb-mr2-dev
am 7dadc59f: Merge "Build Caliper microbenchmark tests.Also fix the URLConnectionBenchmark tests to use the external/mockwebserver." into jb-mr2-dev

* commit '7dadc59f2f54b7f74b351c335e96fe9d6f233b6b':
  Build Caliper microbenchmark tests.Also fix the URLConnectionBenchmark tests to use the external/mockwebserver.
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 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.

(cherry picked from commit cd59afd3e34cb6b3645babdace22c03882e0ec19)

Bug: 8488314
Change-Id: I72f8d6679169480960630bd73745ebf4c55b383c
Merge "NativeCrypto: adjust BasicConstraints check" into jb-mr2-dev
am 55f5e1c2: Merge "NativeCrypto: adjust BasicConstraints check" into jb-mr2-dev

* commit '55f5e1c22658a330ca9c49999354f3e9adef25d0':
  NativeCrypto: adjust BasicConstraints check
am b7d63ddc: Merge "NativeCrypto: adjust BasicConstraints check"

* commit 'b7d63ddc90a7f67ea3e9175417f19eb667e5df9e':
  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"
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.

(cherry picked from commit d14eedd3c70f67a0d7af71b56dcf7b8e4f030bdd)

Bug: 8488314
Change-Id: I716c089c00ab477b4803bdd774681e52384eb95d
am 325ce8a7: NativeCrypto: adjust thrown exceptions

* commit '325ce8a74236f16db63c1971a99aeabf55e61a57':
  NativeCrypto: adjust thrown exceptions
am 332e2c02: Merge "NativeCrypto: adjust thrown exceptions"

* commit '332e2c0229abb92278f698b1fa528f012e3bdd12':
  NativeCrypto: adjust thrown exceptions