summaryrefslogtreecommitdiffstats
path: root/crypto/openssl_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl_util.cc')
-rw-r--r--crypto/openssl_util.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/openssl_util.cc b/crypto/openssl_util.cc
index 6f348ff..7994489 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
}