Home GnuPG
Diffusion GnuPG 344b548dc716

gpg: Also detect a plaintext packet before an encrypted packet.

Description

gpg: Also detect a plaintext packet before an encrypted packet.

* g10/mainproc.c (proc_encrypted): Print warning and later force an
error.

Note that when this error is triggered the plaintext from the literal
data packet has already been outputted before the BEGIN_DECRYPTION
status line. We fail only later to get more information. Callers
need to check and act upon the decryption error code anyway.

Thanks to Marcus for pointing out this case.

  • GnuPG-bug-id: T4000
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jun 6 2018, 3:46 PM
Parents
rG257661d6ae0c: gpg: New command --show-keys.
Branches
Unknown
Tags
Unknown
Tasks
T4000: GnuPG does not check encrypted messages for well-formed composition