mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
testing: Add have-spicy-ssl helper and update tests
This commit is contained in:
parent
fc42074c7c
commit
d18045ee16
12 changed files with 18 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
||||||
# @TEST-DOC: The SSL analyzer picks up on the traffic in pppoe-over-qing, but then raises analyzer_violation_info
|
# @TEST-DOC: The SSL analyzer picks up on the traffic in pppoe-over-qing, but then raises analyzer_violation_info
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h
|
# @TEST-REQUIRES: ! have-spicy-ssl
|
||||||
# @TEST-EXEC: zeek -r $TRACES/pppoe-over-qinq.pcap %INPUT
|
# @TEST-EXEC: zeek -r $TRACES/pppoe-over-qinq.pcap %INPUT
|
||||||
# @TEST-EXEC: btest-diff .stdout
|
# @TEST-EXEC: btest-diff .stdout
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
# below does. Don't ask. :-)
|
# below does. Don't ask. :-)
|
||||||
|
|
||||||
# @TEST-REQUIRES: $SCRIPTS/have-spicy # This test logs loaded scripts, so disable it if Spicy and it associated plugin is unavailable.
|
# @TEST-REQUIRES: $SCRIPTS/have-spicy # This test logs loaded scripts, so disable it if Spicy and it associated plugin is unavailable.
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # Enabling Spicy SSL changes the loaded scripts, skip in this case
|
# @TEST-REQUIRES: ! have-spicy-ssl # Enabling Spicy SSL changes the loaded scripts, skip in this case
|
||||||
# @TEST-EXEC: zeek -b misc/loaded-scripts
|
# @TEST-EXEC: zeek -b misc/loaded-scripts
|
||||||
# @TEST-EXEC: test -e loaded_scripts.log
|
# @TEST-EXEC: test -e loaded_scripts.log
|
||||||
# @TEST-EXEC: cat loaded_scripts.log | grep -E -v '#' | awk 'NR>0{print $1}' | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
|
# @TEST-EXEC: cat loaded_scripts.log | grep -E -v '#' | awk 'NR>0{print $1}' | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
# below does. Don't ask. :-)
|
# below does. Don't ask. :-)
|
||||||
|
|
||||||
# @TEST-REQUIRES: ${SCRIPTS}/have-spicy
|
# @TEST-REQUIRES: ${SCRIPTS}/have-spicy
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # Enabling Spicy SSL changes the loaded scripts, skip in this case
|
# @TEST-REQUIRES: ! have-spicy-ssl # Enabling Spicy SSL changes the loaded scripts, skip in this case
|
||||||
# @TEST-EXEC: zeek misc/loaded-scripts
|
# @TEST-EXEC: zeek misc/loaded-scripts
|
||||||
# @TEST-EXEC: test -e loaded_scripts.log
|
# @TEST-EXEC: test -e loaded_scripts.log
|
||||||
# @TEST-EXEC: cat loaded_scripts.log | grep -E -v '#' | sed 's/ //g' | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
|
# @TEST-EXEC: cat loaded_scripts.log | grep -E -v '#' | sed 's/ //g' | sed -e ':a' -e '$!N' -e 's/^\(.*\).*\n\1.*/\1/' -e 'ta' >prefix
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# @TEST-REQUIRES: test "${ZEEK_ZAM}" != "1"
|
# @TEST-REQUIRES: test "${ZEEK_ZAM}" != "1"
|
||||||
# @TEST-REQUIRES: ${SCRIPTS}/have-spicy # This test logs loaded scripts, so disable it if Spicy and the associated plugin are unavailable.
|
# @TEST-REQUIRES: ${SCRIPTS}/have-spicy # This test logs loaded scripts, so disable it if Spicy and the associated plugin are unavailable.
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # Enabling Spicy SSL changes baselines and thus changes raised events. Skip in this case.
|
# @TEST-REQUIRES: ! have-spicy-ssl # Enabling Spicy SSL changes baselines and thus changes raised events. Skip in this case.
|
||||||
# @TEST-EXEC: ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Demo Hooks
|
# @TEST-EXEC: ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Demo Hooks
|
||||||
# @TEST-EXEC: cp -r %DIR/hooks-plugin/* .
|
# @TEST-EXEC: cp -r %DIR/hooks-plugin/* .
|
||||||
# @TEST-EXEC: ./configure --zeek-dist=${DIST} && make
|
# @TEST-EXEC: ./configure --zeek-dist=${DIST} && make
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# This tests the certificate_request message parsing
|
# This tests the certificate_request message parsing
|
||||||
|
|
||||||
# Does not work in spicy version, due to missing DTLS support
|
# Does not work in spicy version, due to missing DTLS support
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h
|
# @TEST-REQUIRES: ! have-spicy-ssl
|
||||||
|
|
||||||
# @TEST-EXEC: zeek -b -r $TRACES/tls/client-certificate.pcap %INPUT > out
|
# @TEST-EXEC: zeek -b -r $TRACES/tls/client-certificate.pcap %INPUT > out
|
||||||
# @TEST-EXEC: zeek -C -b -r $TRACES/tls/certificate-request-failed.pcap %INPUT >> out
|
# @TEST-EXEC: zeek -C -b -r $TRACES/tls/certificate-request-failed.pcap %INPUT >> out
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This tests a normal SSL connection and the log it outputs.
|
# This tests a normal SSL connection and the log it outputs.
|
||||||
|
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # DTLS not supported in Spicy SSL
|
# @TEST-REQUIRES: ! have-spicy-ssl # DTLS not supported in Spicy SSL
|
||||||
# @TEST-EXEC: zeek -C -r $TRACES/tls/dtls13-wolfssl.pcap %INPUT
|
# @TEST-EXEC: zeek -C -r $TRACES/tls/dtls13-wolfssl.pcap %INPUT
|
||||||
# @TEST-EXEC: cp ssl.log ssl-all.log
|
# @TEST-EXEC: cp ssl.log ssl-all.log
|
||||||
# @TEST-EXEC: echo "start CID test"
|
# @TEST-EXEC: echo "start CID test"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # DTLS is not supported in Spicy SSL yet
|
# @TEST-REQUIRES: ! have-spicy-ssl # DTLS is not supported in Spicy SSL yet
|
||||||
# @TEST-EXEC: zeek -b -r $TRACES/tls/webrtc-stun.pcap %INPUT
|
# @TEST-EXEC: zeek -b -r $TRACES/tls/webrtc-stun.pcap %INPUT
|
||||||
# @TEST-EXEC: btest-diff ssl.log
|
# @TEST-EXEC: btest-diff ssl.log
|
||||||
# @TEST-EXEC: touch dpd.log
|
# @TEST-EXEC: touch dpd.log
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# This tests a normal SSL connection and the log it outputs.
|
# This tests a normal SSL connection and the log it outputs.
|
||||||
|
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # DTLS is not supported in Spicy SSL yet
|
# @TEST-REQUIRES: ! have-spicy-ssl # DTLS is not supported in Spicy SSL yet
|
||||||
# @TEST-EXEC: zeek -b -r $TRACES/tls/dtls1_0.pcap %INPUT
|
# @TEST-EXEC: zeek -b -r $TRACES/tls/dtls1_0.pcap %INPUT
|
||||||
# @TEST-EXEC: btest-diff ssl.log
|
# @TEST-EXEC: btest-diff ssl.log
|
||||||
# @TEST-EXEC: btest-diff x509.log
|
# @TEST-EXEC: btest-diff x509.log
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Does not work in spicy version, due to missing DTLS support
|
# Does not work in spicy version, due to missing DTLS support
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h
|
# @TEST-REQUIRES: ! have-spicy-ssl
|
||||||
|
|
||||||
# @TEST-EXEC: zeek -b -r $TRACES/tls/dhe.pcap %INPUT
|
# @TEST-EXEC: zeek -b -r $TRACES/tls/dhe.pcap %INPUT
|
||||||
# @TEST-EXEC: cat ssl.log > ssl-all.log
|
# @TEST-EXEC: cat ssl.log > ssl-all.log
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# @TEST-REQUIRES: grep -q "#define OPENSSL_HAVE_KDF_H" $BUILD/zeek-config.h
|
# @TEST-REQUIRES: grep -q "#define OPENSSL_HAVE_KDF_H" $BUILD/zeek-config.h
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h # Decryption is not supported in Spicy SSL
|
# @TEST-REQUIRES: ! have-spicy-ssl # Decryption is not supported in Spicy SSL
|
||||||
|
|
||||||
# @TEST-EXEC: zeek -B dpd -C -r $TRACES/tls/tls12-decryption.pcap %INPUT
|
# @TEST-EXEC: zeek -B dpd -C -r $TRACES/tls/tls12-decryption.pcap %INPUT
|
||||||
# @TEST-EXEC: btest-diff http.log
|
# @TEST-EXEC: btest-diff http.log
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Does not work in spicy version, due to missing DTLS support
|
# Does not work in spicy version, due to missing DTLS support
|
||||||
# @TEST-REQUIRES: ! grep -q "#define ENABLE_SPICY_SSL" $BUILD/zeek-config.h
|
# @TEST-REQUIRES: ! have-spicy-ssl
|
||||||
|
|
||||||
# @TEST-EXEC: zeek -b -r $TRACES/tls/dhe.pcap %INPUT
|
# @TEST-EXEC: zeek -b -r $TRACES/tls/dhe.pcap %INPUT
|
||||||
# @TEST-EXEC: cat ssl.log > ssl-all.log
|
# @TEST-EXEC: cat ssl.log > ssl-all.log
|
||||||
|
|
7
testing/scripts/have-spicy-ssl
Executable file
7
testing/scripts/have-spicy-ssl
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if grep -q "#define ENABLE_SPICY_SSL" "${BUILD}/zeek-config.h"; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 1
|
Loading…
Add table
Add a link
Reference in a new issue