Skip to content
Snippets Groups Projects
Verified Commit f3d48f1c authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček
Browse files

policy.TLS_FORWARD tests: add cases from Tomas

parent c0d327d7
No related branches found
No related tags found
1 merge request!492policy.TLS_FORWARD: fix a bug, add test + NEWS
......@@ -20,6 +20,12 @@ local function test_tls_forward()
ok(policy.TLS_FORWARD({{'100:dead::', insecure=true},
{'100:dead::@443', insecure=true}
}), 'TLS_FORWARD with duplicate IP addresses but different ports is allowed')
ok(policy.TLS_FORWARD({{'100:dead::', insecure=true},
{'100:beef::', insecure=true}
}), 'TLS_FORWARD with different IPv6 addresses is allowed')
ok(policy.TLS_FORWARD({{'127.0.0.1', insecure=true},
{'127.0.0.2', insecure=true}
}), 'TLS_FORWARD with different IPv4 addresses is allowed')
boom(policy.TLS_FORWARD, {{{'::1', pin_sha256=''}}}, 'TLS_FORWARD with empty pin_sha256')
-- boom(policy.TLS_FORWARD, {{{'::1', pin_sha256='č'}}}, 'TLS_FORWARD with bad pin_sha256')
......@@ -38,6 +44,7 @@ local function test_tls_forward()
boom(policy.TLS_FORWARD, {{{'::1', hostname='', ca_file='/tmp/ca.crt'}}}, 'TLS_FORWARD with empty hostname + CA cert')
boom(policy.TLS_FORWARD, {{{'::1', hostname='test.', ca_file='/dev/a_file_which_surely_does_NOT_exist!'}}},
'TLS_FORWARD with hostname + unreadable CA cert')
end
return {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment