> From: openssl-users [mailto:openssl-users-bounces@xxxxxxxxxxx] On Behalf Of > Estefania > Sent: Thursday, February 20, 2020 01:36 > > I do not know if I explained well, i have a .pem with a private key inside > like this. > > -----BEGIN PRIVATE KEY----- > masdfasdfasdfasdfasdfasdfasdff > asdfasdfasdfasdfasdfasdfasdfasf > asdfasfasdfasdfasdfasdfasdfasdf > -----END PRIVATE KEY----- > > > and i need to convert it to .p12 This works fine for me: $ openssl pkcs12 -export -inkey keyfile.pem -out keyfile.p12 -passin pass:keyfile-password -password pass:export-password -nocerts You can verify the output with: $ openssl pkcs12 -noout -info -in keyfile.p12 which (after entering the export password) should show the file contains the MAC and a PKCS#7 shrouded keybag. -- Michael Wojcik Distinguished Engineer, Micro Focus