diff options
author | Ingela Anderton Andin <[email protected]> | 2013-03-15 10:20:09 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2013-04-03 15:22:07 +0200 |
commit | 5ddcb614a0a96a54ed1a7aa3cba3356b85021096 (patch) | |
tree | 35f3d7fec29dc01eba0f17f2f5917c16aadcb289 /lib/ssl/src/ssl.erl | |
parent | 9a913b0219188a96f55d5f266bc2ce52c034aa4c (diff) | |
download | otp-5ddcb614a0a96a54ed1a7aa3cba3356b85021096.tar.gz otp-5ddcb614a0a96a54ed1a7aa3cba3356b85021096.tar.bz2 otp-5ddcb614a0a96a54ed1a7aa3cba3356b85021096.zip |
ssl: Add option to list all available ciper suites and enhanced documentation
Diffstat (limited to 'lib/ssl/src/ssl.erl')
-rw-r--r-- | lib/ssl/src/ssl.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index d5f5fa6b04..70f3b4f050 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -355,7 +355,7 @@ negotiated_next_protocol(#sslsocket{pid = Pid}) -> ssl_connection:negotiated_next_protocol(Pid). -spec cipher_suites() -> [erl_cipher_suite()]. --spec cipher_suites(erlang | openssl) -> [erl_cipher_suite()] | [string()]. +-spec cipher_suites(erlang | openssl | all ) -> [erl_cipher_suite()] | [string()]. %% Description: Returns all supported cipher suites. %%-------------------------------------------------------------------- @@ -368,8 +368,15 @@ cipher_suites(erlang) -> cipher_suites(openssl) -> Version = ssl_record:highest_protocol_version([]), - [ssl_cipher:openssl_suite_name(S) || S <- ssl_cipher:suites(Version)]. + [ssl_cipher:openssl_suite_name(S) || S <- ssl_cipher:suites(Version)]; +cipher_suites(all) -> + Version = ssl_record:highest_protocol_version([]), + Supported = ssl_cipher:suites(Version) + ++ ssl_cipher:anonymous_suites() + ++ ssl_cipher:psk_suites(Version) + ++ ssl_cipher:srp_suites(), + [suite_definition(S) || S <- Supported]. %%-------------------------------------------------------------------- -spec getopts(#sslsocket{}, [gen_tcp:option_name()]) -> {ok, [gen_tcp:option()]} | {error, reason()}. |