Fix the code used to detect aarch64 capabilities when we don't have getauxval()
authorTom Cosgrove <tom.cosgrove@arm.com>
Sat, 3 Dec 2022 12:58:43 +0000 (12:58 +0000)
committerTomas Mraz <tomas@openssl.org>
Tue, 6 Dec 2022 16:17:32 +0000 (17:17 +0100)
In addition to a missing prototype there was also a missing closing brace '}'.

Fixes #19825.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19833)

crypto/armcap.c

index a43f17304b02ea96e061863b184156c5efcc3ceb..71296786c3b8e4c5df04a6069e962155e1e867fb 100644 (file)
@@ -76,6 +76,7 @@ void _armv8_pmull_probe(void);
 # ifdef __aarch64__
 void _armv8_sm3_probe(void);
 void _armv8_sm4_probe(void);
+void _armv8_eor3_probe(void);
 void _armv8_sha512_probe(void);
 unsigned int _armv8_cpuid_probe(void);
 void _armv8_sve_probe(void);
@@ -354,6 +355,7 @@ void OPENSSL_cpuid_setup(void)
         if (sigsetjmp(ill_jmp, 1) == 0) {
             _armv8_sm3_probe();
             OPENSSL_armcap_P |= ARMV8_SM3;
+        }
         if (sigsetjmp(ill_jmp, 1) == 0) {
             _armv8_eor3_probe();
             OPENSSL_armcap_P |= ARMV8_SHA3;