diff options
author | Ingela Anderton Andin <[email protected]> | 2019-03-13 21:16:02 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-03-18 13:32:14 +0100 |
commit | 6049796ab041624247d61fd92af68f475f627b96 (patch) | |
tree | 5a0b7e6d9036d3d370250def3406c4e839e97573 /lib/public_key/src/pubkey_pem.erl | |
parent | 620ac3e68c5bc8b36143965fcf2892a07dc005c4 (diff) | |
download | otp-6049796ab041624247d61fd92af68f475f627b96.tar.gz otp-6049796ab041624247d61fd92af68f475f627b96.tar.bz2 otp-6049796ab041624247d61fd92af68f475f627b96.zip |
public_key: Add AES 256 encryption for old PEM encryption mechanism
Diffstat (limited to 'lib/public_key/src/pubkey_pem.erl')
-rw-r--r-- | lib/public_key/src/pubkey_pem.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/public_key/src/pubkey_pem.erl b/lib/public_key/src/pubkey_pem.erl index d7e5bc3ad8..0fd1453f7c 100644 --- a/lib/public_key/src/pubkey_pem.erl +++ b/lib/public_key/src/pubkey_pem.erl @@ -101,10 +101,10 @@ encode_pem_entry({'PrivateKeyInfo', Der, EncParams}) -> EncDer = encode_encrypted_private_keyinfo(Der, EncParams), StartStr = pem_start('EncryptedPrivateKeyInfo'), [StartStr, "\n", b64encode_and_split(EncDer), "\n", pem_end(StartStr) ,"\n\n"]; -encode_pem_entry({Type, Der, {Cipher, Salt}}) -> +encode_pem_entry({Type, Decrypted, {Cipher, Salt}}) -> StartStr = pem_start(Type), [StartStr,"\n", pem_decrypt(),"\n", pem_decrypt_info(Cipher, Salt),"\n\n", - b64encode_and_split(Der), "\n", pem_end(StartStr) ,"\n\n"]. + b64encode_and_split(Decrypted), "\n", pem_end(StartStr) ,"\n\n"]. decode_pem_entries([], Entries) -> lists:reverse(Entries); |