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





That worked, Thanks :)
– Rishabh Chaudhary
1 hour ago






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.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift