You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2025/03/09 17:16:22 UTC
(maven-dist-tool) branch master updated: simplify reported key description to pub and uid
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git
The following commit(s) were added to refs/heads/master by this push:
new f67f330 simplify reported key description to pub and uid
f67f330 is described below
commit f67f3304f1b36bc27300b87f899ba74b46aa7369
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Mar 9 18:16:15 2025 +0100
simplify reported key description to pub and uid
---
.../java/org/apache/maven/dist/tools/pgp/CheckPgpKeysReport.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/main/java/org/apache/maven/dist/tools/pgp/CheckPgpKeysReport.java b/src/main/java/org/apache/maven/dist/tools/pgp/CheckPgpKeysReport.java
index a82fd39..caf7f83 100644
--- a/src/main/java/org/apache/maven/dist/tools/pgp/CheckPgpKeysReport.java
+++ b/src/main/java/org/apache/maven/dist/tools/pgp/CheckPgpKeysReport.java
@@ -243,7 +243,15 @@ public class CheckPgpKeysReport extends AbstractDistCheckReport {
@Override
public String next() {
+ // get only gpg --list-sigs <ID>, not armoured content
String id = content.substring(0, content.indexOf(BEGIN)).trim();
+ // and even strip variable complex content: pub and uid are the 2 (or 3, it depends) interesting lines here
+ int uid = id.indexOf("uid ");
+ if (uid > 0) {
+ int eol = id.indexOf('\n', uid);
+ id = id.substring(0, eol);
+ }
+
content = content.substring(content.indexOf(END) + END.length()).trim();
return id;
}