mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 12:38:20 +00:00
cluster/websocket: Implement WebSocket server
This commit is contained in:
parent
1e757b2b59
commit
6032741868
75 changed files with 2860 additions and 4 deletions
19
testing/btest/cluster/websocket/tls-usage-error.zeek
Normal file
19
testing/btest/cluster/websocket/tls-usage-error.zeek
Normal file
|
@ -0,0 +1,19 @@
|
|||
# @TEST-DOC: Calling listen_websocket() with badly configured WebSocketTLSOptions.
|
||||
#
|
||||
# @TEST-EXEC: zeek -b %INPUT
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
local tls_options_no_key = Cluster::WebSocketTLSOptions(
|
||||
$cert_file="../localhost.crt",
|
||||
);
|
||||
|
||||
local tls_options_no_cert = Cluster::WebSocketTLSOptions(
|
||||
$key_file="../localhost.key",
|
||||
);
|
||||
|
||||
assert ! Cluster::listen_websocket([$listen_host="127.0.0.1", $listen_port=1234/tcp, $tls_options=tls_options_no_key]);
|
||||
assert ! Cluster::listen_websocket([$listen_host="127.0.0.1", $listen_port=1234/tcp, $tls_options=tls_options_no_cert]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue