From 0ce692f2add209c6f5d449ee2be7af725f1813e8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 15 Feb 2022 04:25:22 +0100 Subject: Adding upstream version 1.33.1. Signed-off-by: Daniel Baumann --- database/sqlite/sqlite_health.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'database/sqlite/sqlite_health.c') diff --git a/database/sqlite/sqlite_health.c b/database/sqlite/sqlite_health.c index 116cb4f3e..27c67c3aa 100644 --- a/database/sqlite/sqlite_health.c +++ b/database/sqlite/sqlite_health.c @@ -890,11 +890,19 @@ int sql_store_alert_config_hash(uuid_t *hash_id, struct alert_config *cfg) return 1; } +/* + alert hashes are used for cloud communication. + if cloud is disabled or openssl is not available (which will prevent cloud connectivity) + skip hash calculations +*/ +#if !defined DISABLE_CLOUD && defined ENABLE_HTTPS #define DIGEST_ALERT_CONFIG_VAL(v) ((v) ? EVP_DigestUpdate(evpctx, (v), strlen((v))) : EVP_DigestUpdate(evpctx, "", 1)) +#endif int alert_hash_and_store_config( uuid_t hash_id, struct alert_config *cfg) { +#if !defined DISABLE_CLOUD && defined ENABLE_HTTPS EVP_MD_CTX *evpctx; unsigned char hash_value[EVP_MAX_MD_SIZE]; unsigned int hash_len; @@ -939,6 +947,10 @@ int alert_hash_and_store_config( /* store everything, so it can be recreated when not in memory or just a subset ? */ (void)sql_store_alert_config_hash( (uuid_t *)&hash_value, cfg); +#else + UNUSED(hash_id); + UNUSED(cfg); +#endif return 1; } -- cgit v1.2.3