Petr
Petr

Reputation: 105

openssl pkcs12 set password from command line

I have a bash command like this

openssl pkcs12 -export -out ~/certificate.pfx -inkey /etc/letsencrypt/live/exapmle.com/privkey.pem -in /etc/letsencrypt/live/exapmle.com/cert.pem -certfile /etc/letsencrypt/live/exapmle.com/chain.pem

and now I'll be asked to enter a password to encrypt the .pfx file. So is there any way to set a password from command line to don't doing this operation manually every time?

Upvotes: 4

Views: 7911

Answers (1)

Petr
Petr

Reputation: 105

Resulting command is

openssl pkcs12 -password pass:your_password -export -out ~/certificate.pfx -inkey /etc/letsencrypt/live/exapmle.com/privkey.pem -in /etc/letsencrypt/live/exapmle.com/cert.pem -certfile /etc/letsencrypt/live/exapmle.com/chain.pem

Upvotes: 4

Related Questions