diff options
author | Adam Vartanian <flooey@google.com> | 2017-08-11 10:06:52 +0100 |
---|---|---|
committer | Adam Vartanian <flooey@google.com> | 2017-08-11 10:06:52 +0100 |
commit | 8a2d3348e9716b457640804b1795d65628bf81ac (patch) | |
tree | 84591b433574058c3ea90e7a6b25a35f99bfbdc6 /support | |
parent | 8103480479193a96728034fe0e717c15ac69eb8c (diff) |
Make EVP_has_aes_hardware accessible.
Conscrypt changed to limit visibility to EVP_has_aes_hardware, which means
that in some circumstances CPUs that have AES hardware will show to tests
as not having it, resulting in the wrong expectations in tests.
Bug: 64542254
Bug: 64542486
Test: cts -m CtsLibcoreTestCases (on various devices)
Change-Id: I90cd5a44f7aa21049528ce44c1ee4d96489c9e61
Diffstat (limited to 'support')
-rw-r--r-- | support/src/test/java/libcore/java/security/CpuFeatures.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/support/src/test/java/libcore/java/security/CpuFeatures.java b/support/src/test/java/libcore/java/security/CpuFeatures.java index 319056a6d0..28b4321b1c 100644 --- a/support/src/test/java/libcore/java/security/CpuFeatures.java +++ b/support/src/test/java/libcore/java/security/CpuFeatures.java @@ -47,6 +47,7 @@ public class CpuFeatures { try { Class<?> nativeCrypto = Class.forName("com.android.org.conscrypt.NativeCrypto"); Method EVP_has_aes_hardware = nativeCrypto.getDeclaredMethod("EVP_has_aes_hardware"); + EVP_has_aes_hardware.setAccessible(true); return ((Integer) EVP_has_aes_hardware.invoke(null)) == 1; } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException ignored) { |