RE: Create p12 from a .pem with only a private key

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux