Package org.pgpainless.authentication
Class CertificateAuthenticity
java.lang.Object
org.pgpainless.authentication.CertificateAuthenticity
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
A chain link contains a node in the trust chain. -
Constructor Summary
ConstructorsConstructorDescriptionCertificateAuthenticity
(org.bouncycastle.openpgp.PGPPublicKeyRing certificate, String userId, Map<CertificateAuthenticity.CertificationChain, Integer> certificationChains, int targetAmount) -
Method Summary
Modifier and TypeMethodDescriptionint
Return the degree of authentication of the binding in percent.org.bouncycastle.openpgp.PGPPublicKeyRing
Return a map ofCertificationChains
and their respective effective trust amount.int
boolean
Return true, if the binding is authenticated to a sufficient degree.
-
Constructor Details
-
CertificateAuthenticity
public CertificateAuthenticity(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing certificate, @Nonnull String userId, @Nonnull Map<CertificateAuthenticity.CertificationChain, Integer> certificationChains, int targetAmount)
-
-
Method Details
-
getUserId
-
getCertificate
@Nonnull public org.bouncycastle.openpgp.PGPPublicKeyRing getCertificate() -
getTotalTrustAmount
public int getTotalTrustAmount() -
getAuthenticityPercentage
public int getAuthenticityPercentage()Return the degree of authentication of the binding in percent. 100% means full authentication. Values smaller than 100% mean partial authentication.- Returns:
- authenticity in percent
-
isAuthenticated
public boolean isAuthenticated()Return true, if the binding is authenticated to a sufficient degree.- Returns:
- true if total gathered evidence outweighs the target trust amount.
-
getCertificationChains
Return a map ofCertificationChains
and their respective effective trust amount. The effective trust amount of a path might be smaller than its actual trust amount, for example if nodes of a path are used multiple times.- Returns:
- map of certification chains and their effective trust amounts
-