From 978d3a277baeb25c75e71e4d12342c47d1764205 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Thu, 17 Oct 2024 14:27:57 +0000 Subject: Provide crypto_cpu_caps_init() as a CPU capability detection entry point. This can be overridden on a per-architecture basis. The default version calls OPENSSL_cpuid_setup(), which will be eventually replaced/removed. ok joshua@ tb@ --- src/lib/libcrypto/cryptlib.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/lib/libcrypto/cryptlib.c') diff --git a/src/lib/libcrypto/cryptlib.c b/src/lib/libcrypto/cryptlib.c index fe15135ed9..60f14eba12 100644 --- a/src/lib/libcrypto/cryptlib.c +++ b/src/lib/libcrypto/cryptlib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cryptlib.c,v 1.55 2024/10/17 14:09:29 jsing Exp $ */ +/* $OpenBSD: cryptlib.c,v 1.56 2024/10/17 14:27:57 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. * @@ -124,6 +124,8 @@ #include #include +#include "cryptlib.h" +#include "crypto_internal.h" #include "crypto_local.h" #include "x86_arch.h" @@ -369,6 +371,14 @@ OPENSSL_cpuid_setup(void) } #endif +#ifndef HAVE_CRYPTO_CPU_CAPS_INIT +void +crypto_cpu_caps_init(void) +{ + OPENSSL_cpuid_setup(); +} +#endif + uint64_t OPENSSL_cpu_caps(void) { -- cgit v1.2.3-55-g6feb