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/proxy_header_SUITE.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/proxy_header_SUITE.erl')
-rw-r--r-- | test/proxy_header_SUITE.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/proxy_header_SUITE.erl b/test/proxy_header_SUITE.erl index e6fe406..ce8b6cb 100644 --- a/test/proxy_header_SUITE.erl +++ b/test/proxy_header_SUITE.erl @@ -126,7 +126,8 @@ do_proxy_header_https(Config, ProxyInfo) -> {ok, Socket0} = gen_tcp:connect("localhost", config(port, Config), [binary, {active, false}, {packet, raw}]), ok = gen_tcp:send(Socket0, ranch_proxy_header:header(ProxyInfo)), - {ok, Socket} = ssl:connect(Socket0, [{versions, ['tlsv1.2']}], 1000), + TlsOpts = ct_helper:get_certs_from_ets(), + {ok, Socket} = ssl:connect(Socket0, TlsOpts, 1000), do_proxy_header_http_common({raw_client, Socket, ssl}, ProxyInfo). do_proxy_header_http_common(Client, ProxyInfo) -> @@ -151,8 +152,9 @@ do_proxy_header_h2(Config, ProxyInfo) -> {ok, Socket0} = gen_tcp:connect("localhost", config(port, Config), [binary, {active, false}, {packet, raw}]), ok = gen_tcp:send(Socket0, ranch_proxy_header:header(ProxyInfo)), + TlsOpts = ct_helper:get_certs_from_ets(), {ok, Socket} = ssl:connect(Socket0, - [{alpn_advertised_protocols, [<<"h2">>]}, {versions, ['tlsv1.2']}], 1000), + [{alpn_advertised_protocols, [<<"h2">>]}|TlsOpts], 1000), do_proxy_header_h2_common({raw_client, Socket, ssl}, ProxyInfo). do_proxy_header_h2c(Config, ProxyInfo) -> |