Package org.pgpainless.key.certification
Class CertifyCertificate
java.lang.Object
org.pgpainless.key.certification.CertifyCertificate
API for creating certifications and delegations (Signatures) on keys.
This API can be used to sign another persons OpenPGP key.
A certification over a user-id is thereby used to attest, that the user believes that the user-id really belongs
to the owner of the certificate.
A delegation over a key can be used to delegate trust by marking the certificate as a trusted introducer.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncertificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Create a delegation (direct key signature) over a certificate.certificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate, Trustworthiness trustworthiness) Create a delegation (direct key signature) containing aTrustSignaturepacket over a certificate.userIdOnCertificate(String userId, org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Create a certification over a User-Id.userIdOnCertificate(String userid, org.bouncycastle.openpgp.PGPPublicKeyRing certificate, CertificationType certificationType) Create a certification of the givenCertificationTypeover a User-Id.
-
Constructor Details
-
CertifyCertificate
public CertifyCertificate()
-
-
Method Details
-
userIdOnCertificate
public CertifyCertificate.CertificationOnUserId userIdOnCertificate(@Nonnull String userId, @Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Create a certification over a User-Id. By default, this method will useCertificationType.GENERICto create the signature. If you need to create another type of certification, useuserIdOnCertificate(String, PGPPublicKeyRing, CertificationType)instead.- Parameters:
userId- user-id to certifycertificate- certificate- Returns:
- API
-
userIdOnCertificate
public CertifyCertificate.CertificationOnUserId userIdOnCertificate(@Nonnull String userid, @Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing certificate, @Nonnull CertificationType certificationType) Create a certification of the givenCertificationTypeover a User-Id.- Parameters:
userid- user-id to certifycertificate- certificatecertificationType- type of signature- Returns:
- API
-
certificate
public CertifyCertificate.DelegationOnCertificate certificate(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing certificate) Create a delegation (direct key signature) over a certificate. This can be used to mark a certificate as a trusted introducer (seecertificate(PGPPublicKeyRing, Trustworthiness)).- Parameters:
certificate- certificate- Returns:
- API
-
certificate
public CertifyCertificate.DelegationOnCertificate certificate(@Nonnull org.bouncycastle.openpgp.PGPPublicKeyRing certificate, @Nullable Trustworthiness trustworthiness) Create a delegation (direct key signature) containing aTrustSignaturepacket over a certificate. This can be used to mark a certificate as a trusted introducer.- Parameters:
certificate- certificatetrustworthiness- trustworthiness of the certificate- Returns:
- API
-