mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
add fingerprint to pgp verification result
This commit is contained in:
parent
987aadd4a6
commit
3b8435ca37
2 changed files with 4 additions and 3 deletions
|
@ -98,7 +98,8 @@ public class PGPUtils {
|
||||||
log.debug("Could not find public key for primary key id " + primaryKeyId);
|
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;
|
boolean expired = false;
|
||||||
if(signedByKey != null) {
|
if(signedByKey != null) {
|
||||||
Iterator<String> userIds = signedByKey.getUserIDs();
|
Iterator<String> userIds = signedByKey.getUserIDs();
|
||||||
|
@ -108,7 +109,7 @@ public class PGPUtils {
|
||||||
expired = isExpired(signedByKey);
|
expired = isExpired(signedByKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PGPVerificationResult(primaryKeyId, userId, signatureVerification.getSignature().getCreationTime(), expired, keySource);
|
return new PGPVerificationResult(primaryKeyId, userId, fingerprint, signatureVerification.getSignature().getCreationTime(), expired, keySource);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,4 +2,4 @@ package com.sparrowwallet.drongo.pgp;
|
||||||
|
|
||||||
import java.util.Date;
|
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) { }
|
||||||
|
|
Loading…
Reference in a new issue