Add password to openssl .pem file from -password
Add password to openssl .pem file from -password
I am generating a .pem
file using openssl using the command:
.pem
openssl genrsa -aes256 -out ca.key.pem 4096
It is working great but when I do this:
openssl genrsa -aes256 -out ca.key.pem 4096 -password pass:abcd
It is still asking me for a password in the terminal and not automatically taking the supplied password.
I've tried generating certificates before and it works for them eg.
openssl pkcs12 -name username -inkey cert/key.key -in abc.pem -export -out cert.p12 -password pass:abcd
1 Answer
1
Your very close to the goal ! Key size must be the last parameter and -password
replace with -passout
-password
-passout
openssl genrsa -aes256 -out ca.key.pem -passout pass:abcd 4096
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
That worked, Thanks :)
– Rishabh Chaudhary
1 hour ago