0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix TLS tests for OTP-26+

ct_helper now uses the test certificates generated by
public_key. A few adjustments had to be made as a result.
This commit is contained in:
Loïc Hoguin 2023-03-30 15:38:29 +02:00
parent 251e70b219
commit 12108ab668
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
5 changed files with 70 additions and 60 deletions

View file

@ -184,22 +184,16 @@ cert(Config) ->
ssl -> do_cert(Config)
end.
do_cert(Config0) ->
do_cert(Config) ->
doc("A client TLS certificate was provided."),
{CaCert, Cert, Key} = ct_helper:make_certs(),
Config = [{tls_opts, [
{cert, Cert},
{key, Key},
{cacerts, [CaCert]}
]}|Config0],
Cert = do_get_body("/cert", Config),
Cert = do_get_body("/direct/cert", Config),
ok.
cert_undefined(Config) ->
doc("No client TLS certificate was provided."),
<<"undefined">> = do_get_body("/cert", Config),
<<"undefined">> = do_get_body("/direct/cert", Config),
<<"undefined">> = do_get_body("/cert", [{no_cert, true}|Config]),
<<"undefined">> = do_get_body("/direct/cert", [{no_cert, true}|Config]),
ok.
header(Config) ->