From 44c4a91cc8e80e1e56fc9e04c12ce2cd174d6d6e Mon Sep 17 00:00:00 2001 From: Arne Welzel Date: Wed, 6 Nov 2024 13:34:46 +0100 Subject: [PATCH] ssl/validate-certs: Remove Broker::auto_publish() --- scripts/policy/protocols/ssl/validate-certs.zeek | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/scripts/policy/protocols/ssl/validate-certs.zeek b/scripts/policy/protocols/ssl/validate-certs.zeek index 4d23c8e02d..9c1c54b185 100644 --- a/scripts/policy/protocols/ssl/validate-certs.zeek +++ b/scripts/policy/protocols/ssl/validate-certs.zeek @@ -61,39 +61,27 @@ export { global intermediate_cache: table[string] of vector of opaque of x509; -@if ( Cluster::is_enabled() ) -event zeek_init() - { - Broker::auto_publish(Cluster::worker_topic, SSL::intermediate_add); - Broker::auto_publish(Cluster::manager_topic, SSL::new_intermediate); - } -@endif - function add_to_cache(key: string, value: vector of opaque of x509) { intermediate_cache[key] = value; @if ( Cluster::is_enabled() ) - event SSL::new_intermediate(key, value); + Broker::publish(Cluster::manager_topic, SSL::new_intermediate, key, value); @endif } -@if ( Cluster::is_enabled() && Cluster::local_node_type() != Cluster::MANAGER ) event SSL::intermediate_add(key: string, value: vector of opaque of x509) { intermediate_cache[key] = value; } -@endif -@if ( Cluster::is_enabled() && Cluster::local_node_type() == Cluster::MANAGER ) event SSL::new_intermediate(key: string, value: vector of opaque of x509) { if ( key in intermediate_cache ) return; intermediate_cache[key] = value; - event SSL::intermediate_add(key, value); + Broker::publish(Cluster::worker_topic, SSL::intermediate_add, key, value); } -@endif function cache_validate(chain: vector of opaque of x509): X509::Result {