aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/pbe_SUITE.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2019-06-17 16:50:20 +0200
committerErlang/OTP <[email protected]>2019-06-17 16:50:20 +0200
commit8ba6427bba42152a81f5bbb5a66dd3478db75f08 (patch)
tree47547c55910223f8cae42c1da3aa5f7d66547499 /lib/public_key/test/pbe_SUITE.erl
parent66ae1e444e2442bfa57e01d8c7b4005a8d69eb4e (diff)
parent1a58ece4788ce6ff89827019d085f62a47d9726d (diff)
downloadotp-8ba6427bba42152a81f5bbb5a66dd3478db75f08.tar.gz
otp-8ba6427bba42152a81f5bbb5a66dd3478db75f08.tar.bz2
otp-8ba6427bba42152a81f5bbb5a66dd3478db75f08.zip
Merge branch 'ingela/public_key/PEBS2-backport/OTP-15870' into maint-21
* ingela/public_key/PEBS2-backport/OTP-15870: public_key: Add AES to PBE2
Diffstat (limited to 'lib/public_key/test/pbe_SUITE.erl')
-rw-r--r--lib/public_key/test/pbe_SUITE.erl5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/public_key/test/pbe_SUITE.erl b/lib/public_key/test/pbe_SUITE.erl
index 523c9e2515..5dea35dce6 100644
--- a/lib/public_key/test/pbe_SUITE.erl
+++ b/lib/public_key/test/pbe_SUITE.erl
@@ -218,7 +218,9 @@ pbes2() ->
[{doc,"Tests encode/decode EncryptedPrivateKeyInfo encrypted with different ciphers using PBES2"}].
pbes2(Config) when is_list(Config) ->
decode_encode_key_file("pbes2_des_cbc_enc_key.pem", "password", "DES-CBC", Config),
- decode_encode_key_file("pbes2_des_ede3_cbc_enc_key.pem", "password", "DES-EDE3-CBC", Config),
+ decode_encode_key_file("pbes2_des_ede3_cbc_enc_key.pem", "password", "DES-EDE3-CBC", Config),
+ decode_encode_key_file("pbes2_aes_128_enc_key.pem", "password", "AES-128-CBC", Config),
+ decode_encode_key_file("pbes2_aes_256_enc_key.pem", "password", "AES-256-CBC", Config),
case lists:member(rc2_cbc, proplists:get_value(ciphers, crypto:supports())) of
true ->
decode_encode_key_file("pbes2_rc2_cbc_enc_key.pem", "password", "RC2-CBC", Config);
@@ -231,7 +233,6 @@ decode_encode_key_file(File, Password, Cipher, Config) ->
{ok, PemKey} = file:read_file(filename:join(Datadir, File)),
PemEntry = public_key:pem_decode(PemKey),
- ct:print("Pem entry: ~p" , [PemEntry]),
[{Asn1Type, _, {Cipher,_} = CipherInfo} = PubEntry] = PemEntry,
#'RSAPrivateKey'{} = KeyInfo = public_key:pem_entry_decode(PubEntry, Password),
PemKey1 = public_key:pem_encode([public_key:pem_entry_encode(Asn1Type, KeyInfo, {CipherInfo, Password})]),