[Pkg-openssl-devel] Bug#861285: Bug#861285: openssl enc -k path-for-keyphrase-file ...c does not fail if the keyphrase-file is missing.
Sebastian Andrzej Siewior
sebastian at breakpoint.cc
Thu Apr 27 12:08:08 UTC 2017
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
More information about the Pkg-openssl-devel
mailing list