diff options
author | Ingela Anderton Andin <[email protected]> | 2016-04-22 10:22:52 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-04-25 11:42:05 +0200 |
commit | b0741885a4ce780b653b8ab723b1af9504f12748 (patch) | |
tree | fa4f04c84be7b159e87541efdf93ec1dc1fef9ef /lib/public_key/test/public_key_SUITE.erl | |
parent | f1db2eb29768eca2d7affdfd95753b477df05beb (diff) | |
download | otp-b0741885a4ce780b653b8ab723b1af9504f12748.tar.gz otp-b0741885a4ce780b653b8ab723b1af9504f12748.tar.bz2 otp-b0741885a4ce780b653b8ab723b1af9504f12748.zip |
public_key: Remove use of crypto:rand_bytes/1
public_key use cases are cryptographical so use
crypto:strong_rand_bytes/1 instead.
Diffstat (limited to 'lib/public_key/test/public_key_SUITE.erl')
-rw-r--r-- | lib/public_key/test/public_key_SUITE.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl index be1a4472e9..51050c4480 100644 --- a/lib/public_key/test/public_key_SUITE.erl +++ b/lib/public_key/test/public_key_SUITE.erl @@ -199,7 +199,7 @@ encrypted_pem(Config) when is_list(Config) -> RSAKey = public_key:der_decode('RSAPrivateKey', DerRSAKey), - Salt0 = crypto:rand_bytes(8), + Salt0 = crypto:strong_rand_bytes(8), Entry0 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey, {{"DES-EDE3-CBC", Salt0}, "1234abcd"}), RSAKey = public_key:pem_entry_decode(Entry0,"1234abcd"), @@ -208,7 +208,7 @@ encrypted_pem(Config) when is_list(Config) -> [{'RSAPrivateKey', _, {"DES-EDE3-CBC", Salt0}}] = erl_make_certs:pem_to_der(Des3KeyFile), - Salt1 = crypto:rand_bytes(8), + Salt1 = crypto:strong_rand_bytes(8), Entry1 = public_key:pem_entry_encode('RSAPrivateKey', RSAKey, {{"DES-CBC", Salt1}, "4567efgh"}), DesKeyFile = filename:join(Datadir, "des_client_key.pem"), |