zeek/testing/btest/scripts/base/protocols/ssl
Johanna Amann e14eddeb97 SSL Analyzer: track connection direction by messages
This PR changes the way in which the SSL analyzer tracks the direction
of connections. So far, the SSL analyzer assumed that the originator of
a connection would send the client hello (and other associated
client-side events), and that the responder would be the SSL servers.

In some circumstances this is not true, and the initiator of a
connection is the server, with the responder being the client. So far
this confused some of the internal statekeeping logic and could lead to
mis-parsing of extensions.

This reversal of roles can happen in DTLS, if a connection uses STUN -
and potentially in some StartTLS protocols.

This PR tracks the direction of a TLS connection using the hello
request, client hello and server hello handshake messages. Furthermore,
it changes the SSL events from providing is_orig to providing is_client,
where is_client is true for the client_side of a connection. Since the
argument positioning in the event has not changed, old scripts will
continue to work seamlessly - the new semantics are what everyone
writing SSL scripts will have expected in any case.

There is a new event that is raised when a connection is flipped. A
weird is raised if a flip happens repeatedly.

Addresses GH-2198.
2022-06-24 18:35:44 +01:00
..
basic.test Change SSL and X.509 logging format 2021-06-29 09:26:43 +01:00
common_name.test General btest cleanup 2020-08-11 11:26:22 -07:00
comp_methods.test General btest cleanup 2020-08-11 11:26:22 -07:00
cve-2015-3194.test General btest cleanup 2020-08-11 11:26:22 -07:00
dhe.test General btest cleanup 2020-08-11 11:26:22 -07:00
dpd.test Match DPD TLS signature on one-sided connections. 2022-02-01 16:51:21 +00:00
dtls-no-dtls.test GH-239: Rename bro to zeek, bro-config to zeek-config, and bro-path-dev to zeek-path-dev. 2019-05-01 21:43:45 +00:00
dtls-stun-dpd.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
dtls.test General btest cleanup 2020-08-11 11:26:22 -07:00
ecdhe.test General btest cleanup 2020-08-11 11:26:22 -07:00
ecdsa.test General btest cleanup 2020-08-11 11:26:22 -07:00
fragment.test Baseline updates for recent SSL changes. 2021-06-29 15:03:03 +01:00
handshake-events.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
keyexchange.test General btest cleanup 2020-08-11 11:26:22 -07:00
ocsp-http-get.test Enable OCSP logging by default. 2021-06-29 09:26:29 +01:00
ocsp-request-only.test Enable OCSP logging by default. 2021-06-29 09:26:29 +01:00
ocsp-request-response.test Enable OCSP logging by default. 2021-06-29 09:26:29 +01:00
ocsp-response-only.test Enable OCSP logging by default. 2021-06-29 09:26:29 +01:00
ocsp-revoked.test Enable OCSP logging by default. 2021-06-29 09:26:29 +01:00
ocsp-stapling.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
signed_certificate_timestamp.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
tls-1.2-ciphers.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls-1.2-handshake-failure.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls-1.2-random.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls-1.2.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls-extension-events.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
tls1_1.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls13-experiment.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
tls13-version.test General btest cleanup 2020-08-11 11:26:22 -07:00
tls13.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
tls13_encrypted_handshake_events.test SSL Analyzer: track connection direction by messages 2022-06-24 18:35:44 +01:00
x509-invalid-extension.test General btest cleanup 2020-08-11 11:26:22 -07:00
x509_extensions.test OpenSSL 3: fix warnings and tests 2021-11-17 13:33:49 +00:00