aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-08-23 15:01:40 +0200
committerIngela Anderton Andin <[email protected]>2012-08-23 15:01:40 +0200
commitf5c54053e4d99c7c6eb1163047632d16c1fd5f19 (patch)
tree5ece82a994b212551373fab18a58b0209baa2893
parentf87936b28199e4ed6e67ff188996108776fbfb1f (diff)
downloadotp-f5c54053e4d99c7c6eb1163047632d16c1fd5f19.tar.gz
otp-f5c54053e4d99c7c6eb1163047632d16c1fd5f19.tar.bz2
otp-f5c54053e4d99c7c6eb1163047632d16c1fd5f19.zip
ssl: Clean up of code thanks to dialyzer
-rw-r--r--lib/ssl/src/ssl_cipher.erl12
-rw-r--r--lib/ssl/src/ssl_connection.erl2
-rw-r--r--lib/ssl/src/ssl_handshake.erl2
-rw-r--r--lib/ssl/src/ssl_handshake.hrl1
4 files changed, 8 insertions, 9 deletions
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index 80df8fd5cb..567690a413 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -606,11 +606,13 @@ hash_size(md5) ->
hash_size(sha) ->
20;
hash_size(sha256) ->
- 32;
-hash_size(sha384) ->
- 48;
-hash_size(sha512) ->
- 64.
+ 32.
+%% Currently no supported cipher suites defaults to sha384 or sha512
+%% so these clauses are not needed at the moment.
+%% hash_size(sha384) ->
+%% 48;
+%% hash_size(sha512) ->
+%% 64.
%% RFC 5246: 6.2.3.2. CBC Block Cipher
%%
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 4954f5d668..ff2556c488 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -1633,8 +1633,6 @@ verify_dh_params(_Version, Signed, Hashes, _HashAlgo, {?rsaEncryption, PubKey, _
_ ->
false
end;
-verify_dh_params(_Version, Signed, Hash, undefined, {?'id-dsa', PublicKey, PublicKeyParams}) ->
- public_key:verify({digest, Hash}, sha, Signed, {PublicKey, PublicKeyParams});
verify_dh_params(_Version, Signed, Hash, HashAlgo, {?'id-dsa', PublicKey, PublicKeyParams}) ->
public_key:verify({digest, Hash}, HashAlgo, Signed, {PublicKey, PublicKeyParams}).
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index f198591c93..28469dfa5f 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -334,7 +334,7 @@ certificate_request(ConnectionStates, CertDbHandle, CertDbRef) ->
-spec key_exchange(client | server, tls_version(),
{premaster_secret, binary(), public_key_info()} |
{dh, binary()} |
- {dh, {binary(), binary()}, #'DHParameter'{}, hash_algo(),
+ {dh, {binary(), binary()}, #'DHParameter'{}, {HashAlgo::atom(), SignAlgo::atom()},
binary(), binary(), private_key()}) ->
#client_key_exchange{} | #server_key_exchange{}.
%%
diff --git a/lib/ssl/src/ssl_handshake.hrl b/lib/ssl/src/ssl_handshake.hrl
index 9967a265c1..cc17dc2975 100644
--- a/lib/ssl/src/ssl_handshake.hrl
+++ b/lib/ssl/src/ssl_handshake.hrl
@@ -32,7 +32,6 @@
-type public_key_params() :: #'Dss-Parms'{} | term().
-type public_key_info() :: {algo_oid(), #'RSAPublicKey'{} | integer() , public_key_params()}.
-type tls_handshake_history() :: {[binary()], [binary()]}.
--type hash_algo() :: atom().
%% Signature algorithms
-define(ANON, 0).