aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/src/pubkey_ssh.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-09-11 16:03:17 +0200
committerHans Nilsson <[email protected]>2017-09-12 13:02:26 +0200
commitef9c973897ea40744600075a7743bf5f2f3fa2f0 (patch)
treef2bae5408eb2df9f0d60f0b9cb7a8293efa0d0fe /lib/public_key/src/pubkey_ssh.erl
parent24053bba1d00ee959d2b388b08e1bd845d9c6bfa (diff)
downloadotp-ef9c973897ea40744600075a7743bf5f2f3fa2f0.tar.gz
otp-ef9c973897ea40744600075a7743bf5f2f3fa2f0.tar.bz2
otp-ef9c973897ea40744600075a7743bf5f2f3fa2f0.zip
public_key: Deprecated random function replaced
Diffstat (limited to 'lib/public_key/src/pubkey_ssh.erl')
-rw-r--r--lib/public_key/src/pubkey_ssh.erl4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/public_key/src/pubkey_ssh.erl b/lib/public_key/src/pubkey_ssh.erl
index 5055866ab2..75c1880655 100644
--- a/lib/public_key/src/pubkey_ssh.erl
+++ b/lib/public_key/src/pubkey_ssh.erl
@@ -79,9 +79,7 @@ dh_gex_group(Min, N, Max, undefined) ->
dh_gex_group(Min, N, Max, Groups) ->
case select_by_keylen(Min-10, N, Max+10, Groups) of
{ok,{Sz,GPs}} ->
- Rnd = crypto:rand_uniform(1, 1+length(GPs)),
- %% 1 =< Rnd < 1+length(GPs)
- %% <=>
+ Rnd = rand:uniform( length(GPs) ),
%% 1 =< Rnd =< length(GPs)
{ok, {Sz, lists:nth(Rnd,GPs)}};
Other ->