add fingerprint to pgp verification result

This commit is contained in:
Craig Raw 2024-03-07 08:20:56 +02:00
parent 987aadd4a6
commit 3b8435ca37
2 changed files with 4 additions and 3 deletions

View file

@ -98,7 +98,8 @@ public class PGPUtils {
log.debug("Could not find public key for primary key id " + primaryKeyId);
}
String userId = subkeyIdentifier.getPrimaryKeyFingerprint().prettyPrint();
String fingerprint = subkeyIdentifier.getPrimaryKeyFingerprint().prettyPrint();
String userId = fingerprint;
boolean expired = false;
if(signedByKey != null) {
Iterator<String> userIds = signedByKey.getUserIDs();
@ -108,7 +109,7 @@ public class PGPUtils {
expired = isExpired(signedByKey);
}
return new PGPVerificationResult(primaryKeyId, userId, signatureVerification.getSignature().getCreationTime(), expired, keySource);
return new PGPVerificationResult(primaryKeyId, userId, fingerprint, signatureVerification.getSignature().getCreationTime(), expired, keySource);
}
}
}

View file

@ -2,4 +2,4 @@ package com.sparrowwallet.drongo.pgp;
import java.util.Date;
public record PGPVerificationResult(long keyId, String userId, Date signatureTimestamp, boolean expired, PGPKeySource keySource) { }
public record PGPVerificationResult(long keyId, String userId, String fingerprint, Date signatureTimestamp, boolean expired, PGPKeySource keySource) { }