[PATCH 05/10] Make PGP macros global
- From
- Anton Wuerfel <anton.wuerfel@fau.de>
- Date
- Mar 17, 2016, 18:46 UTC
- Message-ID
- <1458240421-3593-6-git-send-email-anton.wuerfel@fau.de>
- In-Reply-To
- <1458240421-3593-1-git-send-email-anton.wuerfel@fau.de>
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 3dc2fe3..4b42860 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 ea68885..04b0eab 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;
-- 2.8.0.rc0.62.gfc8aefa.dirty