From a2cc8b13dc317507abcc64e2f12cc8346a064106 Mon Sep 17 00:00:00 2001 From: Anton Wuerfel <anton.wuerfel@fau.de> Date: Wed, 16 Mar 2016 17:00:48 +0100 Subject: [PATCH] Make PGP macros global MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit moves the macros PGP_SIGNATURE and PGP_MESSAGE to gpg-interface.h to make them publicly reachable, which is necessary for RFC3161 time-stamping. When verifying an RFC3161 time-stamp signature, a SHA-1 hash has to be generated over the git object excluding a possible PGP signature, which makes it necessary to detect the beginning of this PGP signature. Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> --- gpg-interface.c | 3 --- gpg-interface.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gpg-interface.c b/gpg-interface.c index 3dc2fe397e..4b4286050d 100644 --- a/gpg-interface.c +++ b/gpg-interface.c @@ -7,9 +7,6 @@ static char *configured_signing_key; static const char *gpg_program = "gpg"; -#define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----" -#define PGP_MESSAGE "-----BEGIN PGP MESSAGE-----" - void signature_check_clear(struct signature_check *sigc) { free(sigc->payload); diff --git a/gpg-interface.h b/gpg-interface.h index ea68885ad5..04b0eaba2c 100644 --- a/gpg-interface.h +++ b/gpg-interface.h @@ -4,6 +4,9 @@ #define GPG_VERIFY_VERBOSE 1 #define GPG_VERIFY_RAW 2 +#define PGP_SIGNATURE "-----BEGIN PGP SIGNATURE-----" +#define PGP_MESSAGE "-----BEGIN PGP MESSAGE-----" + struct signature_check { char *payload; char *gpg_output; -- GitLab