]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
x509-store: reduce number of pre-allocated hashtable buckets
authorNikola Pajkovsky <nikolap@openssl.org>
Tue, 21 Oct 2025 16:49:27 +0000 (18:49 +0200)
committerNeil Horman <nhorman@openssl.org>
Wed, 22 Oct 2025 19:02:18 +0000 (15:02 -0400)
pre-allocating too much hashtable objects to avoid the hashtable
regrowing is mistake, and had immediate impact on memory footprint.

Resolves: https://github.com/openssl/project/issues/1679
Link: https://openssl-library.org/performance/
Fixes: 04589b59ef50 ("x509store: reduce lock contention in X509_STORE")
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28965)

crypto/x509/x509_lu.c

index 46b87e1bff4562648c843ecde5bfd92cdc56f422..a8a80fb94883698b9c30acb4afcf1b7be943b70d 100644 (file)
@@ -17,7 +17,7 @@
 #include <openssl/x509v3.h>
 #include "x509_local.h"
 
-#define X509_OBJS_HT_BUCKETS 512
+#define X509_OBJS_HT_BUCKETS 8
 
 X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method)
 {