aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-04-22 10:23:56 +0200
committerIngela Anderton Andin <[email protected]>2016-04-25 11:42:05 +0200
commitaf05855ddc48ae72bb2cfd82ab3fd3ab45238135 (patch)
tree95b5a3023bbd026d881059ab8ff6b276ed33c557 /lib/ssh/test/ssh_test_lib.erl
parentb0741885a4ce780b653b8ab723b1af9504f12748 (diff)
downloadotp-af05855ddc48ae72bb2cfd82ab3fd3ab45238135.tar.gz
otp-af05855ddc48ae72bb2cfd82ab3fd3ab45238135.tar.bz2
otp-af05855ddc48ae72bb2cfd82ab3fd3ab45238135.zip
ssh: Remove use of crypto:rand_bytes/1
ssh use cases are cryptographical so use crypto:strong_rand_bytes/1 instead.
Diffstat (limited to 'lib/ssh/test/ssh_test_lib.erl')
-rw-r--r--lib/ssh/test/ssh_test_lib.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index abbd4857c9..4db7d09ccd 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -100,7 +100,7 @@ std_simple_sftp(Host, Port, Config, Opts) ->
DataFile = filename:join(UserDir, "test.data"),
ConnectionRef = ssh_test_lib:std_connect(Config, Host, Port, Opts),
{ok, ChannelRef} = ssh_sftp:start_channel(ConnectionRef),
- Data = crypto:rand_bytes(proplists:get_value(std_simple_sftp_size,Config,10)),
+ Data = crypto:strong_rand_bytes(proplists:get_value(std_simple_sftp_size,Config,10)),
ok = ssh_sftp:write_file(ChannelRef, DataFile, Data),
{ok,ReadData} = file:read_file(DataFile),
ok = ssh:close(ConnectionRef),
@@ -354,7 +354,7 @@ setup_rsa_pass_pharse(DataDir, UserDir, Phrase) ->
setup_pass_pharse(KeyBin, OutFile, Phrase) ->
[{KeyType, _,_} = Entry0] = public_key:pem_decode(KeyBin),
Key = public_key:pem_entry_decode(Entry0),
- Salt = crypto:rand_bytes(8),
+ Salt = crypto:strong_rand_bytes(8),
Entry = public_key:pem_entry_encode(KeyType, Key,
{{"DES-CBC", Salt}, Phrase}),
Pem = public_key:pem_encode([Entry]),