aboutsummaryrefslogtreecommitdiffstats
path: root/common/ksba-io-support.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-03-08 09:57:25 +0000
committerWerner Koch <[email protected]>2023-03-08 10:00:00 +0000
commit2a13f7f9dc75265ece649e30fecd3dc694b1240e (patch)
tree125cac1ec1a73805f7e5c1e88d1e27ff86babf72 /common/ksba-io-support.h
parentscd: Fix checking memory allocation. (diff)
downloadgnupg-2a13f7f9dc75265ece649e30fecd3dc694b1240e.tar.gz
gnupg-2a13f7f9dc75265ece649e30fecd3dc694b1240e.zip
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.
Diffstat (limited to 'common/ksba-io-support.h')
-rw-r--r--common/ksba-io-support.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/ksba-io-support.h b/common/ksba-io-support.h
index e33e0ed74..02e541b16 100644
--- a/common/ksba-io-support.h
+++ b/common/ksba-io-support.h
@@ -36,6 +36,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. */