From 47e358dc183b152d814f5deb25925e0d46d8d1a4 Mon Sep 17 00:00:00 2001 From: Sami Ahmed Date: Wed, 29 Apr 2026 14:30:41 -0700 Subject: [PATCH] Fix crypter.h missing include for OPENSSL_cleanse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Latent header-hygiene bug: crypter.h calls OPENSSL_cleanse at lines 99-100 but never declared the dependency. Built fine because the precompiled header on triangles_common pulled in transitively, so every translation unit that included crypter.h also got the symbol. Surfaced by enabling -DBUILD_TESTS=ON: test_triangles is configured without REUSE_FROM the PCH, so test/sigopcount_tests.cpp fails to find OPENSSL_cleanse when crypter.h is reached transitively via key.h/wallet.h. Adding the explicit include is the principled fix — headers should declare their own dependencies rather than rely on the consumer's precompiled-header configuration. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/crypter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crypter.h b/src/crypter.h index c1bb64f..61c563d 100644 --- a/src/crypter.h +++ b/src/crypter.h @@ -8,6 +8,8 @@ #include "key.h" #include "serialize.h" +#include /* for OPENSSL_cleanse */ + const unsigned int WALLET_CRYPTO_KEY_SIZE = 32; const unsigned int WALLET_CRYPTO_SALT_SIZE = 8;