[openssl] master update
tomas at openssl.org
tomas at openssl.org
Tue May 11 08:03:15 UTC 2021
The branch master has been updated
via f1a45f68bcdceaa2944d078cc65ffb0b3845c43e (commit)
from d29d7a7ff22e8e3be1c8bbdb8edd3ab9c72ed021 (commit)
- Log -----------------------------------------------------------------
commit f1a45f68bcdceaa2944d078cc65ffb0b3845c43e
Author: David CARLIER <devnexen at gmail.com>
Date: Mon Apr 19 21:26:50 2021 +0100
armcap: fix Mac M1 SHA512 support.
The SIGILL catch/trap works however disabled purposely for Darwin,
thus relying on native api instead.
Reviewed-by: Paul Dale <pauli at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14935)
-----------------------------------------------------------------------
Summary of changes:
crypto/armcap.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/crypto/armcap.c b/crypto/armcap.c
index dc2326f8f6..28cadfbb2e 100644
--- a/crypto/armcap.c
+++ b/crypto/armcap.c
@@ -13,6 +13,9 @@
#include <setjmp.h>
#include <signal.h>
#include <openssl/crypto.h>
+#ifdef __APPLE__
+#include <sys/sysctl.h>
+#endif
#include "internal/cryptlib.h"
#include "arm_arch.h"
@@ -135,7 +138,8 @@ void OPENSSL_cpuid_setup(void)
return;
}
-# if defined(__APPLE__) && !defined(__aarch64__)
+# if defined(__APPLE__)
+# if !defined(__aarch64__)
/*
* Capability probing by catching SIGILL appears to be problematic
* on iOS. But since Apple universe is "monocultural", it's actually
@@ -151,6 +155,15 @@ void OPENSSL_cpuid_setup(void)
* Unified code works because it never triggers SIGILL on Apple
* devices...
*/
+# else
+ {
+ unsigned int sha512;
+ size_t len = sizeof(sha512);
+
+ if (sysctlbyname("hw.optional.armv8_2_sha512", &sha512, &len, NULL, 0) == 0 && sha512 == 1)
+ OPENSSL_armcap_P |= ARMV8_SHA512;
+ }
+# endif
# endif
OPENSSL_armcap_P = 0;
More information about the openssl-commits
mailing list