aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/pbe_SUITE.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-09-02 15:22:50 +0200
committerFredrik Gustafsson <[email protected]>2013-09-02 15:22:50 +0200
commit1a57f9d04b0e846ba6dccdb99643c4f7ab17705f (patch)
tree2f4d0e0f306edf20b12060d65d6b3cf0096b051e /lib/public_key/test/pbe_SUITE.erl
parentb1b6087d7f52b4ac88c90b52be7b66f0e894e565 (diff)
parent909d2b4975f4e6b01c70e3577c8be510c7481ff6 (diff)
downloadotp-1a57f9d04b0e846ba6dccdb99643c4f7ab17705f.tar.gz
otp-1a57f9d04b0e846ba6dccdb99643c4f7ab17705f.tar.bz2
otp-1a57f9d04b0e846ba6dccdb99643c4f7ab17705f.zip
Merge branch 'dotsimon/pubkey_aes_cbc/OTP-11281' into maint
* dotsimon/pubkey_aes_cbc/OTP-11281: Allow public_key:pem_entry_decode/2) to handle AES-128-CBC ciphered keys
Diffstat (limited to 'lib/public_key/test/pbe_SUITE.erl')
-rw-r--r--lib/public_key/test/pbe_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/public_key/test/pbe_SUITE.erl b/lib/public_key/test/pbe_SUITE.erl
index 2c9b17478d..b68ffbd5fd 100644
--- a/lib/public_key/test/pbe_SUITE.erl
+++ b/lib/public_key/test/pbe_SUITE.erl
@@ -218,6 +218,14 @@ encrypted_private_key_info(Config) when is_list(Config) ->
[{'PrivateKeyInfo', _, {"RC2-CBC",_}} = PubEntry2] = PemRc2Entry,
KeyInfo = public_key:pem_entry_decode(PubEntry2, "password"),
+ %% key generated with ssh-keygen -N hello_aes -f aes_128_cbc_enc_key
+ {ok, PemAesCbc} = file:read_file(filename:join(Datadir, "aes_128_cbc_enc_key")),
+
+ PemAesCbcEntry = public_key:pem_decode(PemAesCbc),
+ ct:print("Pem entry: ~p" , [PemAesCbcEntry]),
+ [{'RSAPrivateKey', _, {"AES-128-CBC",_}} = PubAesCbcEntry] = PemAesCbcEntry,
+ #'RSAPrivateKey'{} = public_key:pem_entry_decode(PubAesCbcEntry, "hello_aes"),
+
check_key_info(KeyInfo).