Fix for -z option being ignored in openpgp mode and incorrect filenames #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See https://forums.gentoo.org/viewtopic-t-1070876.html
Summary: default (openpgp) mode does not properly handle addition and stripping of .gz/.bz
file components, resulting in mismatching plaintext/decoded file names and misleads
the user to believe openpgp ciphertext has been first compressed using external tools.
mcrypt w/default config uses openpgp, but does not indicate that the -z option's calls
to external gzip or bzip are not used in this mode.
As compression before encryption is generally considered good for security, this is
misleading and use of -z with the default openpgp mode should cause an error informing
that the openpgp mode will not use external gzip/bzip tools prior to encryption.
In addition, the .gz/.bz path component should not be added if the program is
using openpgp mode and will not call gzip or bzip. Doing so results, on decryption,
with a misleading .gz/.bz extension to the resulting (uncompressed) plaintext.
Steps to Reproduce