mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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.
(cherry picked from commit 2a13f7f9dc
)
This commit is contained in:
parent
a6e47400c7
commit
6bdf11f671
4 changed files with 119 additions and 5 deletions
|
@ -37,6 +37,7 @@
|
|||
#define GNUPG_KSBA_IO_BASE64 2 /* Plain Base64 format. */
|
||||
#define GNUPG_KSBA_IO_AUTODETECT 4 /* Try to autodetect the format. */
|
||||
#define GNUPG_KSBA_IO_MULTIPEM 8 /* Allow more than one PEM chunk. */
|
||||
#define GNUPG_KSBA_IO_STRIP 16 /* Strip off zero padding. */
|
||||
|
||||
|
||||
/* Context object. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue