git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 05/10] Make PGP macros global

From
AWAnton 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
Previous: Anton WuerfelNext: Anton Wuerfel
Message 6 of 11 in “Adding RFC3161 time-stamps to tags”
  1. 00/10 Adding RFC3161 time-stamps to tagsAnton Wuerfel, Mar 17, 2016
  2. 01/10 Add Testcases for time-stamping functionalityAnton Wuerfel, Mar 17, 2016
  3. 02/10 Documentation for time-stamping functionalityAnton Wuerfel, Mar 17, 2016
  4. 03/10 Documentation: Whitespace fixAnton Wuerfel, Mar 17, 2016
  5. 04/10 Extending internal CURL wrapper for POST uploadAnton Wuerfel, Mar 17, 2016
  6. 05/10 Make PGP macros globalAnton Wuerfel, Mar 17, 2016
  7. 06/10 Add basic RFC3161 functionalityAnton Wuerfel, Mar 17, 2016
  8. 07/10 Add git-http-timestamp helper toolAnton Wuerfel, Mar 17, 2016
  9. 08/10 Adding time-stamping helper toolAnton Wuerfel, Mar 17, 2016
  10. 09/10 Add time-stamping functionality to git verify-tagAnton Wuerfel, Mar 17, 2016
  11. 10/10 Add time-stamping functionality to git tagAnton Wuerfel, Mar 17, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.