On 2017-04-27 08:46:10 [+0900], ISHIKAWA,chiaki wrote: > KFILE=path-for-passphrase-file (say, ~/mypass) > BNAME=file-to-be-encrypted > > openssl enc -k ${KFILE} -in ${BNAME} -out ${BNAME}.enc -aes-256-cbc > > To my surprise if ${KFILE} is missing, openssl does not complain > and seems to encrypt the input file anyway: but with what passphrase?! … > I would rather see openssl complain that the passphrase file is > missing LOUD and CLEAR (and returns an error code. I checked that the > following does not print "fail".
$ openssl enc --help 2>&1|grep -- -k -k val Passphrase -kfile infile Read passphrase from file I think you mixed up -k with -kfile. Sebastian