aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2019-01-21 14:46:33 +0100
committerSiri Hansen <[email protected]>2019-01-21 14:46:33 +0100
commit9c8075413728e3be373d7dff2a7168b3983e0be3 (patch)
tree35a3ed275f2ea6f333f5be903e39ddbe6c5a9700 /lib/common_test
parent88cc8d25abe9e6fb7708a6ea673aa0637a28860a (diff)
parenta8364425a7190b65cd33e58ac3c155a77c462b74 (diff)
downloadotp-9c8075413728e3be373d7dff2a7168b3983e0be3.tar.gz
otp-9c8075413728e3be373d7dff2a7168b3983e0be3.tar.bz2
otp-9c8075413728e3be373d7dff2a7168b3983e0be3.zip
Merge branch 'maint'
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/src/ct_config.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/common_test/src/ct_config.erl b/lib/common_test/src/ct_config.erl
index a10d939919..a07e61199b 100644
--- a/lib/common_test/src/ct_config.erl
+++ b/lib/common_test/src/ct_config.erl
@@ -592,7 +592,7 @@ encrypt_config_file(SrcFileName, EncryptFileName, {file,KeyFile}) ->
encrypt_config_file(SrcFileName, EncryptFileName, {key,Key}) ->
_ = crypto:start(),
- {Key,IVec} = make_crypto_key(Key),
+ {CryptoKey,IVec} = make_crypto_key(Key),
case file:read_file(SrcFileName) of
{ok,Bin0} ->
Bin1 = term_to_binary({SrcFileName,Bin0}),
@@ -600,7 +600,7 @@ encrypt_config_file(SrcFileName, EncryptFileName, {key,Key}) ->
0 -> Bin1;
N -> list_to_binary([Bin1,random_bytes(8-N)])
end,
- EncBin = crypto:block_encrypt(des3_cbc, Key, IVec, Bin2),
+ EncBin = crypto:block_encrypt(des3_cbc, CryptoKey, IVec, Bin2),
case file:write_file(EncryptFileName, EncBin) of
ok ->
io:format("~ts --(encrypt)--> ~ts~n",
@@ -631,10 +631,10 @@ decrypt_config_file(EncryptFileName, TargetFileName, {file,KeyFile}) ->
decrypt_config_file(EncryptFileName, TargetFileName, {key,Key}) ->
_ = crypto:start(),
- {Key,IVec} = make_crypto_key(Key),
+ {CryptoKey,IVec} = make_crypto_key(Key),
case file:read_file(EncryptFileName) of
{ok,Bin} ->
- DecBin = crypto:block_decrypt(des3_cbc, Key, IVec, Bin),
+ DecBin = crypto:block_decrypt(des3_cbc, CryptoKey, IVec, Bin),
case catch binary_to_term(DecBin) of
{'EXIT',_} ->
{error,bad_file};