mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-22 19:08:00 +01:00
Manually checkout SignatureSubpacketsUtil methods for wot
This commit is contained in:
parent
6487cf2371
commit
e61d414a98
1 changed files with 21 additions and 0 deletions
|
@ -531,6 +531,11 @@ public final class SignatureSubpacketsUtil {
|
|||
return hashed(signature, SignatureSubpacket.exportableCertification);
|
||||
}
|
||||
|
||||
public static boolean isExportable(PGPSignature signature) {
|
||||
Exportable exportable = getExportableCertification(signature);
|
||||
return exportable == null || exportable.isExportable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the trust signature packet from the signatures hashed area.
|
||||
*
|
||||
|
@ -541,6 +546,22 @@ public final class SignatureSubpacketsUtil {
|
|||
return hashed(signature, SignatureSubpacket.trustSignature);
|
||||
}
|
||||
|
||||
public static int getTrustDepthOr(PGPSignature signature, int defaultDepth) {
|
||||
TrustSignature packet = getTrustSignature(signature);
|
||||
if (packet != null) {
|
||||
return packet.getDepth();
|
||||
}
|
||||
return defaultDepth;
|
||||
}
|
||||
|
||||
public static int getTrustAmountOr(PGPSignature signature, int defaultAmount) {
|
||||
TrustSignature packet = getTrustSignature(signature);
|
||||
if (packet != null) {
|
||||
return packet.getTrustAmount();
|
||||
}
|
||||
return defaultAmount;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return all regular expression subpackets from the hashed area of the given signature.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue