aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-06-23 10:16:15 +0000
committerWerner Koch <[email protected]>2025-06-23 10:16:45 +0000
commite6592f2f4601eb2e7e72ba785a64a9351d87c5d3 (patch)
tree25f46772a438c241413d6ada6ca5b908f5d2c21b
parentPost release updates (diff)
downloadgnupg-e6592f2f4601eb2e7e72ba785a64a9351d87c5d3.tar.gz
gnupg-e6592f2f4601eb2e7e72ba785a64a9351d87c5d3.zip
gpg: Re-add the revocation reason to the sigclass in a "rev" record.
* g10/import.c (get_revocation_reason): Fix setting of r_reason. -- Note that gpgme has not yet support for parsing the revocation reason. Due to the split of gpgme it was not tested with gpgmeqt which has its own parser in its regression tests which kicked it when building debian packages. GnuPG-bug-id: 7083 Fixes-commit: 3f825b044b2f1db8773f27a96034c925177fe9f0
-rw-r--r--NEWS3
-rw-r--r--g10/import.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 9d04ac52e..212a54db7 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,9 @@
Noteworthy changes in version 2.5.9 (unreleased)
------------------------------------------------
+ * gpg: Add the revocation reason to the sigclass of a "rev" line.
+ Regression in 2.5.7. [T7073]
+
Release-info: https://dev.gnupg.org/T7695
diff --git a/g10/import.c b/g10/import.c
index 5dad290ca..5985d177b 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -3411,6 +3411,7 @@ get_revocation_reason (PKT_signature *sig, char **r_reason,
size_t reason_n;
const byte *reason_p;
int reason_code = 0;
+ const char *reason_string;
char *freeme;
if (r_reason)
@@ -3427,9 +3428,11 @@ get_revocation_reason (PKT_signature *sig, char **r_reason,
{
reason_code = *reason_p;
reason_n--; reason_p++;
- revocation_reason_code_to_str (reason_code, &freeme);
- if (r_reason)
+ reason_string = revocation_reason_code_to_str (reason_code, &freeme);
+ if (r_reason && freeme)
*r_reason = freeme;
+ else if (r_reason && reason_string)
+ *r_reason = xstrdup (reason_string);
else
xfree (freeme);