So it's not the most secure practice to pass a password in through a command line argument. That said, the documentation for openssl confused me on how to pass a password argument to the openssl command.
Here's what I'm trying to do
openssl aes-256-cbc -in some_file.enc -out some_file.unenc -d
This then prompts for the pass key for decryption. I searched the openssl documents and the interwebs to try and find the answer if I simply wanted to give the password to the command without trying to echo the password to the file. I tried adding -pass:somepassword and -pass somepassword both with and without quotes to no avail.
I finally figured out the answer and saw in some other forums people had similar questions, so I thought I would post my question and answer here for the community.
note: I'm using openssl version 0.9.8y
opensslcommands (not justenc) is in the man page for openssl(1) also on the web under 'OPTIONS'. But I don't believe your last bit about -passin/out; otheropensslcommands likersa dsa ec pkey pkcs8 pkcs12 req cado use those but in every version I've seen including 1.0.1e built directly from upstream sourceencuses-passor-k -kfileas documented (on theencmanpage). – dave_thompson_085 Jun 18 '17 at 11:52openssl dgstcommand? How do you enter the passphrase for that at the command line? – Frak May 11 '18 at 16:47-passinis used to provide a password for the input certificate, and-passoutis for the new generated certificate – drmad May 20 '18 at 02:44