Create p12 from a .pem with only a private key

Dirk-Willem van Gulik dirkx at webweaving.org
Thu Feb 20 07:43:27 UTC 2020



> On 20 Feb 2020, at 08:38, Estefania <stefy83 at gmail.com> wrote:
> 
> Hi guys.
> 
> I would like to ask if it is possible to create a p12 just with a .pem with
> private key but not certificate.

Try

	openssl req -x509 -subj /CN=foo -keyout /dev/null -nodes | openssl pkcs12 -out sample.p12 -export -certs

to make one containing just one cert without a private key.

Dw.


More information about the openssl-users mailing list