From 2046d3659f617f0650a550fa4ec084ec66578804 Mon Sep 17 00:00:00 2001 From: retoor Date: Sat, 24 Oct 2026 07:43:33 +0200 Subject: [PATCH] build(clients): link Sha256, Hmac and SecureRandom into libai; drop the crypto_link shim Co-Authored-By: Claude Sonnet 5.5 --- src/ai.mk | 5 ++++- src/openai/admin/crypto_link.cpp | 9 --------- 2 files changed, 4 insertions(+), 10 deletions(-) delete mode 100644 src/openai/admin/crypto_link.cpp diff --git a/src/ai.mk b/src/ai.mk index 5209889..62882c7 100644 --- a/src/ai.mk +++ b/src/ai.mk @@ -19,7 +19,10 @@ GOOGLE_LIB ?= $(ROOT)/build/google/libgoogle.a # Recursive: every vendor module builds without editing this file. AI_SRCS := $(sort $(shell find $(ROOT)/src/llm $(ROOT)/src/xai $(ROOT)/src/anthropic \ $(ROOT)/src/meta $(ROOT)/src/deepseek $(ROOT)/src/openai $(ROOT)/src/openrouter -name "*.cpp")) \ - $(ROOT)/src/security/crypto/Base64.cpp + $(ROOT)/src/security/crypto/Base64.cpp \ + $(ROOT)/src/security/crypto/Sha256.cpp \ + $(ROOT)/src/security/crypto/Hmac.cpp \ + $(ROOT)/src/security/crypto/SecureRandom.cpp AI_TEST_SRCS := $(sort $(shell find $(ROOT)/tests/src/llm $(ROOT)/tests/src/xai \ $(ROOT)/tests/src/anthropic $(ROOT)/tests/src/meta \ $(ROOT)/tests/src/deepseek $(ROOT)/tests/src/openai $(ROOT)/tests/src/openrouter -name "*.cpp")) diff --git a/src/openai/admin/crypto_link.cpp b/src/openai/admin/crypto_link.cpp deleted file mode 100644 index 34573fe..0000000 --- a/src/openai/admin/crypto_link.cpp +++ /dev/null @@ -1,9 +0,0 @@ -// Link shim. src/ai.mk (shared, not editable from this package) compiles only -// src/security/crypto/Base64.cpp into libai, but WebhookVerifier uses -// security::crypto::Hmac (and SecureRandom::constant_time_equal), which need -// Sha256.cpp, Hmac.cpp and SecureRandom.cpp. They are compiled here until the -// integration step adds those three files to AI_SRCS in src/ai.mk; then delete -// this file (keeping both would be a duplicate symbol error at link time). -#include "security/crypto/Sha256.cpp" -#include "security/crypto/Hmac.cpp" -#include "security/crypto/SecureRandom.cpp"