Home GnuPG
Diffusion GnuPG 054a187f24b1

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.

(cherry picked from commit 344b548dc71657d0285d93f78f17a2663b5e586f)

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

Details

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