crypto/armcap.c: mask SHA512 hardware detection on iOS.
authorAndy Polyakov <appro@openssl.org>
Mon, 5 Mar 2018 16:10:03 +0000 (17:10 +0100)
committerAndy Polyakov <appro@openssl.org>
Tue, 6 Mar 2018 22:18:24 +0000 (23:18 +0100)
When running iOS application from command line it's impossible to
get past the failing capability detection. This is because it's
executed under debugger and iOS debugger is impossible to deal with.
[If Apple implements SHA512 in silicon, it would have to be detected
with sysctlbyname.]

Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/armcap.c

index d67073302a4c52670d6e0e2469d5c002fcafea1f..1b3c2722d1e168e249a686bb30886323c7b26e9d 100644 (file)
@@ -191,7 +191,7 @@ void OPENSSL_cpuid_setup(void)
             _armv8_sha256_probe();
             OPENSSL_armcap_P |= ARMV8_SHA256;
         }
-# ifdef __aarch64__
+# if defined(__aarch64__) && !defined(__APPLE__)
         if (sigsetjmp(ill_jmp, 1) == 0) {
             _armv8_sha512_probe();
             OPENSSL_armcap_P |= ARMV8_SHA512;