From 827e90e0daabe32e058e08dd2a253425898a7e7a Mon Sep 17 00:00:00 2001 From: Thomas Vanbesien Date: Tue, 17 Feb 2026 19:06:22 +0100 Subject: Replace ClientFindServers with unified Client, use trust store directories Replace the single-purpose ClientFindServers program with a unified Client that supports three operations via CLI: find-servers, get-endpoints, and read-time. This simplifies the architecture by using one client binary with a single config file instead of a monolithic program that did everything in one run. Split the ServerRegister config into separate server and client config files so the LDS-registration credentials are isolated from the server's own settings. The discovery URL moves from config to a CLI argument. Replace repeated trustList config entries with a single trustStore directory path. Each program now points to a directory under certs/trust/ containing .der files, so adding or removing trust is a file-copy operation rather than editing every config file. Add loadTrustStore()/freeTrustStore() to common.c and remove the now-unused configGetAll() from the config parser. Simplify the test matrix from 6 to 4 cases (security and auth are orthogonal, so the full 3x2 matrix is unnecessary). Update run_test.sh to invoke the new Client three times and use port-polling instead of sleep. --- src/config.h | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/config.h') diff --git a/src/config.h b/src/config.h index 649278d..2c5e364 100644 --- a/src/config.h +++ b/src/config.h @@ -7,8 +7,6 @@ * * Parses configuration files with one key=value pair per line. * Lines starting with '#' are comments. Blank lines are ignored. - * Repeated keys are allowed (used for list-valued settings like - * trustList). */ #include @@ -28,8 +26,7 @@ typedef struct /** * @brief A parsed configuration file. * - * Holds a dynamic array of ConfigEntry items. Duplicate keys are - * allowed (used for list-valued settings like trustList). + * Holds a dynamic array of ConfigEntry items. */ typedef struct { @@ -91,22 +88,6 @@ const char *configRequire (const Config *cfg, const char *key, */ int configRequireInt (const Config *cfg, const char *key, const char *program); -/** - * @brief Collects all values for a repeated key. - * - * Allocates an array of char* pointers to the values stored - * in @p cfg. The caller must free the array itself (but not - * the strings, which are owned by cfg). - * - * @param cfg The parsed configuration. - * @param key The key to collect (e.g. "trustList"). - * @param out Output: heap-allocated array of string pointers. - * Set to NULL if the key is not present. - * @param size Output: number of entries in @p out. - */ -void configGetAll (const Config *cfg, const char *key, char ***out, - size_t *size); - /** * @brief Frees all memory owned by a Config structure. * -- cgit v1.2.3