summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Fedotov <hairyhum@gmail.com>2019-04-24 17:07:17 -0400
committerDaniil Fedotov <hairyhum@gmail.com>2019-04-24 17:07:17 -0400
commit32a979d3318accf2971daa2cf09f3446c0e0a1b6 (patch)
tree3c062982d567c3c850d3afbe0bb0fc933ea8f27c
parent310bf16da17c2594f601b10e781bfc7b34fa74da (diff)
downloadrabbitmq-server-git-32a979d3318accf2971daa2cf09f3446c0e0a1b6.tar.gz
Remove check for OTP-20.3 compatibility when formatting cipher_suites.
Minimal supported erlang version is 21.3
-rw-r--r--src/rabbit_ssl.erl16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/rabbit_ssl.erl b/src/rabbit_ssl.erl
index 6c93c61a7e..1e6f1bfeee 100644
--- a/src/rabbit_ssl.erl
+++ b/src/rabbit_ssl.erl
@@ -70,23 +70,11 @@ cipher_suites_openssl(Mode, Version) ->
ssl:cipher_suites(Mode, Version)).
-%% OTP-20.3 and OTP-21 have different modules containing cipher format functions
-%% This is not a hot codepath and `function_exported` should not slow things down much.
format_cipher_erlang(Cipher) ->
- case erlang:function_exported(ssl_cipher_format, suite, 1) of
- true ->
- ssl_cipher_format:erl_suite_definition(ssl_cipher_format:suite(Cipher));
- false ->
- ssl_cipher:erl_suite_definition(ssl_cipher:suite(Cipher))
- end.
+ ssl_cipher_format:erl_suite_definition(ssl_cipher_format:suite(Cipher)).
format_cipher_openssl(Cipher) ->
- case erlang:function_exported(ssl_cipher_format, suite, 1) of
- true ->
- ssl_cipher_format:openssl_suite_name(ssl_cipher_format:suite(Cipher));
- false ->
- ssl_cipher:openssl_suite_name(ssl_cipher:suite(Cipher))
- end.
+ ssl_cipher_format:openssl_suite_name(ssl_cipher_format:suite(Cipher)).
-spec get_highest_protocol_version() -> tls_record:tls_version().
get_highest_protocol_version() ->