Home GnuPG
Diffusion GnuPG 2a13f7f9dc75

gpgsm: Strip trailing zeroes from detached signatures.

Description

gpgsm: Strip trailing zeroes from detached signatures.

* common/ksba-io-support.c: Include tlv.h
(struct reader_cb_parm_s): Add new fields.
(starts_with_sequence): New.
(simple_reader_cb): Handle stripping.
* common/ksba-io-support.h (GNUPG_KSBA_IO_STRIP): New.
(gnupg_ksba_create_reader): Handle the new flag.
* sm/verify.c (gpgsm_verify): Use the new flag for detached
signatures.

Note that this works only if --assume-binary is given. The use case
for the feature is PDF signature checking where the PDF specs require
that the detached signature is padded with zeroes.

Details

Provenance
wernerAuthored on Mar 8 2023, 10:57 AM
Parents
rG4e391d95e071: scd: Fix checking memory allocation.
Branches
Unknown
Tags
Unknown