pacman/scripts/libmakepkg/integrity
David Runge 86ec26b2d3
makepkg: Improve robustness of signature verification by limiting terms
The output of
`gpg --quiet --batch --status-fd /dev/stdout --verify <signature_file> <file> 2> /dev/null`
or
`git verify-commit --raw <commit> 2>&1`
may contain binary data, if the signature has been created with an
OpenPGP implementation, that e.g. makes use of notations.
If the notation string (see `NOTATION_DATA` in /usr/share/doc/gnupg/
DETAILS) contains a trailing binary char, this will break signature
verification, as any following entry (e.g. `VALIDSIG`) will be offset.

As we are only making use of a narrow set of terms from the statusfile
(namely `NEWSIG`, `GOODSIG`, `EXPSIG`, `EXPKEYSIG`, `REVKEYSIG`,
`BADSIG`, `ERRSIG`, `VALIDSIG`, `TRUST_UNDEFINED`, `TRUST_NEVER`,
`TRUST_MARGINAL`, `TRUST_FULLY`, `TRUST_ULTIMATE`), we are applying a
filter, so that only understood terms are written to the file.

Signed-off-by: David Runge <dvzrv@archlinux.org>
2024-02-04 10:06:42 +01:00
..
generate_checksum.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
generate_signature.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
meson.build Add meson.build files to build with meson 2018-11-02 03:16:34 -04:00
verify_checksum.sh.in Rename LIBRARY to MAKEPKG_LIBRARY 2023-11-04 00:02:17 +00:00
verify_signature.sh.in makepkg: Improve robustness of signature verification by limiting terms 2024-02-04 10:06:42 +01:00