mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
Add MessageMetadata.isVerifiedSigned() and .getVerifiedSignatures()
This commit is contained in:
parent
c031ea9285
commit
f005885318
1 changed files with 10 additions and 0 deletions
|
@ -186,6 +186,12 @@ public class MessageMetadata {
|
|||
return isVerifiedInlineSignedBy(keys) || isVerifiedDetachedSignedBy(keys);
|
||||
}
|
||||
|
||||
public List<SignatureVerification> getVerifiedSignatures() {
|
||||
List<SignatureVerification> allVerifiedSignatures = getVerifiedInlineSignatures();
|
||||
allVerifiedSignatures.addAll(getVerifiedDetachedSignatures());
|
||||
return allVerifiedSignatures;
|
||||
}
|
||||
|
||||
public boolean isVerifiedDetachedSignedBy(@Nonnull PGPKeyRing keys) {
|
||||
return containsSignatureBy(getVerifiedDetachedSignatures(), keys);
|
||||
}
|
||||
|
@ -403,6 +409,10 @@ public class MessageMetadata {
|
|||
return firstOrNull(map(getEncryptionLayers(), encryptedData -> encryptedData.decryptionKey));
|
||||
}
|
||||
|
||||
public boolean isVerifiedSigned() {
|
||||
return !getVerifiedSignatures().isEmpty();
|
||||
}
|
||||
|
||||
public interface Packet {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue