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:
parent
251e70b219
commit
12108ab668
5 changed files with 70 additions and 60 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue