aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-10-30 00:04:31 +0100
committerLuca Deri <deri@ntop.org>2023-10-30 00:05:25 +0100
commit8769a2282b89883ccad97ddfe8dfaefefeb51865 (patch)
tree3a443cb86febd75fb7fa77d932ce5c05480e48f4
parent9fb7a635765769d1343af32841c24aa908acb79e (diff)
Disbling AES-NI on FreeBSD as the feature checke does not work well
and it enables it by mistake on IntelB. Coreb" i3-3240 Processor
-rw-r--r--src/lib/third_party/src/gcrypt/aesni.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/third_party/src/gcrypt/aesni.c b/src/lib/third_party/src/gcrypt/aesni.c
index ecce04fc5..513f2d3fe 100644
--- a/src/lib/third_party/src/gcrypt/aesni.c
+++ b/src/lib/third_party/src/gcrypt/aesni.c
@@ -63,12 +63,17 @@ int mbedtls_aesni_has_support( unsigned int what )
return 0;
# endif
#endif
-
+
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
if(force_no_aesni == 1)
return 0;
#endif
+#if defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__
+ /* In FreeBSD we don't have a reliable way to check AES-NI so better disable it */
+ return(0);
+#endif
+
#if defined(linux) || defined(__linux__)
if(has_aesni_checked == 0) {
/*
@@ -114,6 +119,7 @@ int mbedtls_aesni_has_support( unsigned int what )
return ( (ecx & what) != 0 );
#endif
+
#elif defined(WIN32) || defined(WIN64)
int cpuInfo[4];