mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Address feedback
Smaller fixes. I split out the API change of the fallback function into a separate commit.
This commit is contained in:
parent
0a7b358985
commit
3ed9379b9e
4 changed files with 9 additions and 15 deletions
|
@ -214,14 +214,11 @@ event file_hash(f: fa_file, kind: string, hash: string)
|
|||
if ( ! f?$info || "X509" !in f$info$analyzers || kind != "sha256" )
|
||||
return;
|
||||
|
||||
if ( caching_required_encounters == 0 )
|
||||
if ( caching_required_encounters == 0 || hash in certificate_cache )
|
||||
return;
|
||||
|
||||
if ( hash !in certificates_encountered )
|
||||
certificates_encountered[hash] = 0;
|
||||
|
||||
certificates_encountered[hash] += 1;
|
||||
|
||||
if ( certificates_encountered[hash] < caching_required_encounters )
|
||||
return;
|
||||
certificates_encountered[hash] = 1;
|
||||
else
|
||||
certificates_encountered[hash] += 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue