diff options
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. |