Reputation: 900
I am generating a .pem
file using openssl using the command:
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
Upvotes: 3
Views: 27053
Reputation: 1039
You're very close to the goal ! Key size must be the last parameter and -password
replace with -passout
openssl genrsa -aes256 -out ca.key.pem -passout pass:abcd 4096
Upvotes: 9