Merge pull request #3392 from rabbitmq/lh-ranch-2.1
Update Ranch to 2.1
This commit is contained in:
commit
063d32626d
|
@ -100,26 +100,12 @@ ssl_info(_Sock) ->
|
|||
nossl.
|
||||
|
||||
proxy_ssl_info(Sock, {rabbit_proxy_socket, _, ProxyInfo}) ->
|
||||
case ProxyInfo of
|
||||
#{ssl := #{version := Version, cipher := Cipher}} ->
|
||||
Proto = case Version of
|
||||
<<"SSL3">> -> 'ssl3';
|
||||
<<"TLSv1">> -> 'tlsv1';
|
||||
<<"TLSv1.1">> -> 'tlsv1.1';
|
||||
<<"TLSv1.2">> -> 'tlsv1.2';
|
||||
<<"TLSv1.3">> -> 'tlsv1.3';
|
||||
_ -> nossl
|
||||
end,
|
||||
CipherSuite = case ssl:str_to_suite(binary_to_list(Cipher)) of
|
||||
#{} = CS -> CS;
|
||||
_ -> nossl
|
||||
end,
|
||||
case {Proto, CipherSuite} of
|
||||
{nossl, _} -> ssl_info(Sock);
|
||||
{_, nossl} -> ssl_info(Sock);
|
||||
_ -> {ok, [{protocol, Proto}, {selected_cipher_suite, CipherSuite}]}
|
||||
end;
|
||||
_ ->
|
||||
ConnInfo = ranch_proxy_header:to_connection_info(ProxyInfo),
|
||||
case lists:keymember(protocol, 1, ConnInfo) andalso
|
||||
lists:keymember(selected_cipher_suite, 1, ConnInfo) of
|
||||
true ->
|
||||
{ok, ConnInfo};
|
||||
false ->
|
||||
ssl_info(Sock)
|
||||
end;
|
||||
proxy_ssl_info(Sock, _) ->
|
||||
|
|
|
@ -117,7 +117,7 @@ dep_jsx = hex 3.1.0
|
|||
dep_looking_glass = git https://github.com/rabbitmq/looking_glass master
|
||||
dep_prometheus = hex 4.8.1
|
||||
dep_ra = git https://github.com/rabbitmq/ra.git master
|
||||
dep_ranch = hex 2.0.0
|
||||
dep_ranch = hex 2.1.0
|
||||
dep_recon = hex 2.5.1
|
||||
dep_observer_cli = hex 1.6.2
|
||||
dep_stdout_formatter = hex 0.2.4
|
||||
|
|
Loading…
Reference in New Issue