diff --git a/scripts/policy/protocols/ssl/expiring-certs.bro b/scripts/policy/protocols/ssl/expiring-certs.bro index 230c9524cd..9c02c63784 100644 --- a/scripts/policy/protocols/ssl/expiring-certs.bro +++ b/scripts/policy/protocols/ssl/expiring-certs.bro @@ -4,6 +4,8 @@ @load base/protocols/ssl @load base/files/x509 +@load base/frameworks/notice +@load base/utils/directions-and-hosts module SSL; diff --git a/scripts/policy/protocols/ssl/extract-certs-pem.bro b/scripts/policy/protocols/ssl/extract-certs-pem.bro index 1cfccb6556..549c6943e6 100644 --- a/scripts/policy/protocols/ssl/extract-certs-pem.bro +++ b/scripts/policy/protocols/ssl/extract-certs-pem.bro @@ -11,6 +11,7 @@ @load base/protocols/ssl @load base/files/x509 +@load base/utils/directions-and-hosts module SSL; diff --git a/scripts/policy/protocols/ssl/log-hostcerts-only.bro b/scripts/policy/protocols/ssl/log-hostcerts-only.bro index 75b1ae0423..f537616e7f 100644 --- a/scripts/policy/protocols/ssl/log-hostcerts-only.bro +++ b/scripts/policy/protocols/ssl/log-hostcerts-only.bro @@ -1,6 +1,9 @@ ##! When this script is loaded, only the host certificates (client and server) ##! will be logged to x509.log. Logging of all other certificates will be suppressed. +@load base/protocols/ssl +@load base/files/x509 + module X509; export { diff --git a/testing/btest/Baseline/coverage.bare-mode-errors/unique_errors b/testing/btest/Baseline/coverage.bare-mode-errors/errors similarity index 100% rename from testing/btest/Baseline/coverage.bare-mode-errors/unique_errors rename to testing/btest/Baseline/coverage.bare-mode-errors/errors diff --git a/testing/btest/coverage/bare-mode-errors.test b/testing/btest/coverage/bare-mode-errors.test index 1910ef8e17..27e10373ea 100644 --- a/testing/btest/coverage/bare-mode-errors.test +++ b/testing/btest/coverage/bare-mode-errors.test @@ -1,17 +1,9 @@ # Makes sure any given bro script in the scripts/ tree can be loaded in -# bare mode without error. btest-bg-run/btest-bg-wait are used to kill off -# scripts that block after loading, e.g. start listening on a socket. +# bare mode without error. # # Commonly, this test may fail if one forgets to @load some base/ scripts -# when writing a new bro scripts. Look into "allerrors" to find out -# which script had trouble. -# -# @TEST-SERIALIZE: comm +# when writing a new bro scripts. # # @TEST-EXEC: test -d $DIST/scripts -# @TEST-EXEC: for script in `find $DIST/scripts/ -name \*\.bro -not -path '*/site/*'`; do echo "=== $script" >>allerrors; if echo "$script" | egrep -q 'communication/listen|controllee'; then rm -rf load_attempt .bgprocs; btest-bg-run load_attempt bro -b $script; btest-bg-wait -k 2; cat load_attempt/.stderr >>allerrors; else bro -b $script 2>>allerrors; fi done || exit 0 -# @TEST-EXEC: cat allerrors | grep -v "received termination signal" | fgrep -v -f %INPUT | grep -v '===' | sort | uniq > unique_errors -# @TEST-EXEC: btest-diff unique_errors - -# White-list of tests to exclude because of cyclic load dependencies. -scripts/base/protocols/ftp/utils.bro +# @TEST-EXEC: for script in `find $DIST/scripts/ -name \*\.bro`; do bro -b --parse-only $script >>errors 2>&1; done +# @TEST-EXEC: btest-diff errors