ssl/validate-certs: Remove Broker::auto_publish()

This commit is contained in:
Arne Welzel 2024-11-06 13:34:46 +01:00
parent 883ae3694c
commit 44c4a91cc8

View file

@ -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
{