-/* $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.
*
#include <openssl/opensslconf.h>
#include <openssl/crypto.h>
+#include "cryptlib.h"
+#include "crypto_internal.h"
#include "crypto_local.h"
#include "x86_arch.h"
}
#endif
+#ifndef HAVE_CRYPTO_CPU_CAPS_INIT
+void
+crypto_cpu_caps_init(void)
+{
+ OPENSSL_cpuid_setup();
+}
+#endif
+
uint64_t
OPENSSL_cpu_caps(void)
{
-/* $OpenBSD: crypto_init.c,v 1.21 2024/04/10 14:51:02 beck Exp $ */
+/* $OpenBSD: crypto_init.c,v 1.22 2024/10/17 14:27:57 jsing Exp $ */
/*
* Copyright (c) 2018 Bob Beck <beck@openbsd.org>
*
#include <openssl/objects.h>
#include <openssl/x509v3.h>
-#include "cryptlib.h"
+#include "crypto_internal.h"
#include "x509_issuer_cache.h"
int OpenSSL_config(const char *);
{
crypto_init_thread = pthread_self();
- OPENSSL_cpuid_setup();
+ crypto_cpu_caps_init();
+
ERR_load_crypto_strings();
}
-/* $OpenBSD: crypto_internal.h,v 1.12 2024/09/06 09:57:32 tb Exp $ */
+/* $OpenBSD: crypto_internal.h,v 1.13 2024/10/17 14:27:57 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
}
#endif
+void crypto_cpu_caps_init(void);
+
uint64_t crypto_cpu_caps_ia32(void);
#endif