test(emqx_exporto): refactored ssl ciphers call for ct_helpers update
This commit is contained in:
parent
5e15e3add8
commit
90c02f1116
|
@ -424,30 +424,31 @@ udp_opts() ->
|
||||||
{reuseaddr, true}].
|
{reuseaddr, true}].
|
||||||
|
|
||||||
ssl_opts() ->
|
ssl_opts() ->
|
||||||
Path = emqx_ct_helpers:deps_path(emqx, "etc/certs"),
|
Certs = certs("key.pem", "cert.pem", "cacert.pem"),
|
||||||
[{versions, ['tlsv1.2','tlsv1.1',tlsv1]},
|
[{versions, ['tlsv1.2','tlsv1.1',tlsv1]},
|
||||||
{ciphers, ciphers()},
|
{ciphers, ciphers('tlsv1.2')},
|
||||||
{keyfile, Path ++ "/key.pem"},
|
|
||||||
{certfile, Path ++ "/cert.pem"},
|
|
||||||
{cacertfile, Path ++ "/cacert.pem"},
|
|
||||||
{verify, verify_peer},
|
{verify, verify_peer},
|
||||||
{fail_if_no_peer_cert, true},
|
{fail_if_no_peer_cert, true},
|
||||||
{secure_renegotiate, false},
|
{secure_renegotiate, false},
|
||||||
{reuse_sessions, true},
|
{reuse_sessions, true},
|
||||||
{honor_cipher_order, true}].
|
{honor_cipher_order, true}]++Certs.
|
||||||
|
|
||||||
dtls_opts() ->
|
dtls_opts() ->
|
||||||
Opts = ssl_opts(),
|
Opts = ssl_opts(),
|
||||||
lists:keyreplace(versions, 1, Opts, {versions, ['dtlsv1.2', 'dtlsv1']}).
|
lists:keyreplace(versions, 1, Opts, {versions, ['dtlsv1.2', 'dtlsv1']}).
|
||||||
|
|
||||||
ciphers() ->
|
ciphers(Version) ->
|
||||||
proplists:get_value(ciphers, emqx_ct_helpers:client_ssl()).
|
proplists:get_value(ciphers, emqx_ct_helpers:client_ssl(Version)).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% Client-Opts
|
%% Client-Opts
|
||||||
|
|
||||||
client_ssl_opts() ->
|
client_ssl_opts() ->
|
||||||
Path = emqx_ct_helpers:deps_path(emqx, "etc/certs"),
|
certs( "client-key.pem", "client-cert.pem", "cacert.pem" ).
|
||||||
[{keyfile, Path ++ "/client-key.pem"},
|
|
||||||
{certfile, Path ++ "/client-cert.pem"},
|
certs( Key, Cert, CACert ) ->
|
||||||
{cacertfile, Path ++ "/cacert.pem"}].
|
CertsPath = emqx_ct_helpers:deps_path(emqx, "etc/certs"),
|
||||||
|
[ { keyfile, filename:join([ CertsPath, Key ]) },
|
||||||
|
{ certfile, filename:join([ CertsPath, Cert ]) },
|
||||||
|
{ cacertfile, filename:join([ CertsPath, CACert ]) } ].
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue