mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 04:58:21 +00:00
update baselines & add ocsp leak check
This commit is contained in:
parent
d9e7ac6e92
commit
5db240f291
1 changed files with 19 additions and 0 deletions
19
testing/btest/core/leaks/x509_ocsp_verify.bro
Normal file
19
testing/btest/core/leaks/x509_ocsp_verify.bro
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Needs perftools support.
|
||||
#
|
||||
# @TEST-GROUP: leaks
|
||||
#
|
||||
# @TEST-REQUIRES: bro --help 2>&1 | grep -q mem-leaks
|
||||
#
|
||||
# @TEST-EXEC: HEAP_CHECK_DUMP_DIRECTORY=. HEAPCHECK=local btest-bg-run bro bro -b -m -r $TRACES/tls/ocsp-stapling.trace %INPUT
|
||||
# @TEST-EXEC: btest-bg-wait 30
|
||||
|
||||
@load base/protocols/ssl
|
||||
|
||||
event ssl_stapled_ocsp(c: connection, is_orig: bool, response: string)
|
||||
{
|
||||
local chain: vector of opaque of x509 = vector();
|
||||
for ( i in c$ssl$cert_chain )
|
||||
chain[i] = c$ssl$cert_chain[i]$x509$handle;
|
||||
|
||||
print x509_ocsp_verify(chain, response, SSL::root_certs);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue