|
30 | 30 |
|
31 | 31 | % Due to API differences between OTP releases.
|
32 | 32 | -dialyzer(no_missing_calls).
|
33 |
| --ignore_xref([{ssl_cipher_format, erl_suite_definition, 1}, |
| 33 | +-ignore_xref([{ssl_cipher_format, suite_legacy, 1}, |
34 | 34 | {ssl_cipher_format, suite, 1},
|
35 |
| - {ssl_cipher_format, openssl_suite_name, 1}]). |
| 35 | + {ssl_cipher_format, suite_to_str, 1}, |
| 36 | + {ssl_cipher_format, erl_suite_definition, 1}, |
| 37 | + {ssl_cipher_format, suite_map_to_openssl_str, 1}, |
| 38 | + {ssl_cipher_format, suite_map_to_bin, 1}]). |
36 | 39 |
|
37 | 40 | -type certificate() :: rabbit_cert_info:certificate().
|
38 | 41 |
|
@@ -77,10 +80,33 @@ cipher_suites_openssl(Mode, Version) ->
|
77 | 80 |
|
78 | 81 |
|
79 | 82 | format_cipher_erlang(Cipher) ->
|
80 |
| - ssl_cipher_format:erl_suite_definition(ssl_cipher_format:suite(Cipher)). |
| 83 | + case erlang:function_exported(ssl_cipher_format, suite_map_to_bin, 1) of |
| 84 | + true -> |
| 85 | + format_cipher_erlang22(Cipher); |
| 86 | + false -> |
| 87 | + format_cipher_erlang21(Cipher) |
| 88 | + end. |
| 89 | + |
| 90 | +format_cipher_erlang22(Cipher) -> |
| 91 | + ssl_cipher_format:suite_legacy(ssl_cipher_format:suite_map_to_bin(Cipher)). |
| 92 | + |
| 93 | +format_cipher_erlang21(Cipher) -> |
| 94 | + ssl_cipher_format:erl_suite_definition(ssl_cipher_format:suite(Cipher)). |
| 95 | + |
81 | 96 |
|
82 | 97 | format_cipher_openssl(Cipher) ->
|
83 |
| - ssl_cipher_format:openssl_suite_name(ssl_cipher_format:suite(Cipher)). |
| 98 | + case erlang:function_exported(ssl_cipher_format, suite_map_to_bin, 1) of |
| 99 | + true -> |
| 100 | + format_cipher_openssl22(Cipher); |
| 101 | + false -> |
| 102 | + format_cipher_openssl21(Cipher) |
| 103 | + end. |
| 104 | + |
| 105 | +format_cipher_openssl22(Cipher) -> |
| 106 | + ssl_cipher_format:suite_map_to_openssl_str(Cipher). |
| 107 | + |
| 108 | +format_cipher_openssl21(Cipher) -> |
| 109 | + ssl_cipher_format:suite_to_str(Cipher). |
84 | 110 |
|
85 | 111 | -spec get_highest_protocol_version() -> tls_record:tls_version().
|
86 | 112 | get_highest_protocol_version() ->
|
|
0 commit comments