Index: crypto/openssl_util.cc |
diff --git a/crypto/openssl_util.cc b/crypto/openssl_util.cc |
index 6f348ff1a54c0365f8becb70d68ae2f079429b84..79944891e2fbd286617c635bdc080f120f0fc848 100644 |
--- a/crypto/openssl_util.cc |
+++ b/crypto/openssl_util.cc |
@@ -17,6 +17,7 @@ |
#if defined(OS_ANDROID) && defined(ARCH_CPU_ARMEL) |
#include <cpu-features.h> |
+#include "base/cpu.h" |
#endif |
namespace crypto { |
@@ -62,10 +63,9 @@ class OpenSSLInitSingleton { |
(android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0; |
if (has_neon) |
CRYPTO_set_NEON_capable(1); |
- // In all cases, currently, mark the NEON unit as broken because some |
- // phones can't execute the Poly1305 code correctly. See |
- // https://code.google.com/p/chromium/issues/detail?id=341598 |
- CRYPTO_set_NEON_functional(0); |
+ // See https://code.google.com/p/chromium/issues/detail?id=341598 |
+ base::CPU cpu; |
+ CRYPTO_set_NEON_functional(!cpu.has_broken_neon()); |
#endif |
} |