aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/src/ssl_connection.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2018-08-24 12:16:17 +0200
committerHans Nilsson <[email protected]>2018-08-24 12:17:20 +0200
commita0364386d54d6a5c211f66f71e85505953241d07 (patch)
tree8cc70b90193dfed69464ff813889f44a9698464e /lib/ssl/src/ssl_connection.erl
parent74b745494dfa7ef091c0b59dee284606f3d23ce3 (diff)
downloadotp-a0364386d54d6a5c211f66f71e85505953241d07.tar.gz
otp-a0364386d54d6a5c211f66f71e85505953241d07.tar.bz2
otp-a0364386d54d6a5c211f66f71e85505953241d07.zip
ssl: Fix dialyzer errors detected when crypto.erl is typed
Diffstat (limited to 'lib/ssl/src/ssl_connection.erl')
-rw-r--r--lib/ssl/src/ssl_connection.erl14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 7649ed2899..05433b15ba 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -2175,22 +2175,24 @@ generate_srp_server_keys(_SrpParams, 10) ->
generate_srp_server_keys(SrpParams =
#srp_user{generator = Generator, prime = Prime,
verifier = Verifier}, N) ->
- case crypto:generate_key(srp, {host, [Verifier, Generator, Prime, '6a']}) of
- error ->
- generate_srp_server_keys(SrpParams, N+1);
+ try crypto:generate_key(srp, {host, [Verifier, Generator, Prime, '6a']}) of
Keys ->
Keys
+ catch
+ error:_ ->
+ generate_srp_server_keys(SrpParams, N+1)
end.
generate_srp_client_keys(_Generator, _Prime, 10) ->
?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
generate_srp_client_keys(Generator, Prime, N) ->
- case crypto:generate_key(srp, {user, [Generator, Prime, '6a']}) of
- error ->
- generate_srp_client_keys(Generator, Prime, N+1);
+ try crypto:generate_key(srp, {user, [Generator, Prime, '6a']}) of
Keys ->
Keys
+ catch
+ error:_ ->
+ generate_srp_client_keys(Generator, Prime, N+1)
end.
handle_srp_identity(Username, {Fun, UserState}) ->