Package org.pgpainless.key.certification
Class CertifyCertificate
- java.lang.Object
-
- org.pgpainless.key.certification.CertifyCertificate
-
public class CertifyCertificate extends java.lang.ObjectAPI 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 Classes Modifier and Type Class Description static classCertifyCertificate.CertificationOnUserIdstatic classCertifyCertificate.CertificationOnUserIdWithSubpacketsstatic classCertifyCertificate.CertificationResultstatic classCertifyCertificate.DelegationOnCertificatestatic classCertifyCertificate.DelegationOnCertificateWithSubpackets
-
Constructor Summary
Constructors Constructor Description CertifyCertificate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertifyCertificate.DelegationOnCertificatecertificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate)Create a delegation (direct key signature) over a certificate.CertifyCertificate.DelegationOnCertificatecertificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate, Trustworthiness trustworthiness)Create a delegation (direct key signature) containing aTrustSignaturepacket over a certificate.CertifyCertificate.CertificationOnUserIduserIdOnCertificate(java.lang.String userId, org.bouncycastle.openpgp.PGPPublicKeyRing certificate)Create a certification over a User-Id.CertifyCertificate.CertificationOnUserIduserIdOnCertificate(java.lang.String userid, org.bouncycastle.openpgp.PGPPublicKeyRing certificate, CertificationType certificationType)Create a certification of the givenCertificationTypeover a User-Id.
-
-
-
Method Detail
-
userIdOnCertificate
public CertifyCertificate.CertificationOnUserId userIdOnCertificate(@Nonnull java.lang.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 java.lang.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
-
-