diff options
author | Loïc Hoguin <[email protected]> | 2023-03-30 15:38:29 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2023-03-30 15:38:29 +0200 |
commit | 12108ab66831e86b197d291073ed5ab538b7e91b (patch) | |
tree | e4f35e01ae9fa6cf24b7def43b6ab585b55c5e3d /test/cowboy_test.erl | |
parent | 251e70b219aa12752a75c442581ae9ed8ce7461f (diff) | |
download | cowboy-12108ab66831e86b197d291073ed5ab538b7e91b.tar.gz cowboy-12108ab66831e86b197d291073ed5ab538b7e91b.tar.bz2 cowboy-12108ab66831e86b197d291073ed5ab538b7e91b.zip |
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.
Diffstat (limited to 'test/cowboy_test.erl')
-rw-r--r-- | test/cowboy_test.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/cowboy_test.erl b/test/cowboy_test.erl index b703efa..88e5f55 100644 --- a/test/cowboy_test.erl +++ b/test/cowboy_test.erl @@ -112,10 +112,14 @@ gun_open(Config) -> gun_open(Config, #{}). gun_open(Config, Opts) -> + TlsOpts = case proplists:get_value(no_cert, Config, false) of + true -> [{verify, verify_none}]; + false -> ct_helper:get_certs_from_ets() + end, {ok, ConnPid} = gun:open("localhost", config(port, Config), Opts#{ retry => 0, transport => config(type, Config), - tls_opts => [{versions, ['tlsv1.2']}|proplists:get_value(tls_opts, Config, [])], + tls_opts => TlsOpts, protocols => [config(protocol, Config)] }), ConnPid. |