Package org.pgpainless.key.certification
Class CertifyCertificate
- java.lang.Object
-
- org.pgpainless.key.certification.CertifyCertificate
-
public class CertifyCertificate extends java.lang.Object
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 Classes Modifier and Type Class Description static class
CertifyCertificate.CertificationOnUserId
static class
CertifyCertificate.CertificationOnUserIdWithSubpackets
static class
CertifyCertificate.CertificationResult
static class
CertifyCertificate.DelegationOnCertificate
static class
CertifyCertificate.DelegationOnCertificateWithSubpackets
-
Constructor Summary
Constructors Constructor Description CertifyCertificate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CertifyCertificate.DelegationOnCertificate
certificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate)
Create a delegation (direct key signature) over a certificate.CertifyCertificate.DelegationOnCertificate
certificate(org.bouncycastle.openpgp.PGPPublicKeyRing certificate, Trustworthiness trustworthiness)
Create a delegation (direct key signature) containing aTrustSignature
packet over a certificate.CertifyCertificate.CertificationOnUserId
userIdOnCertificate(java.lang.String userId, org.bouncycastle.openpgp.PGPPublicKeyRing certificate)
Create a certification over a User-Id.CertifyCertificate.CertificationOnUserId
userIdOnCertificate(java.lang.String userid, org.bouncycastle.openpgp.PGPPublicKeyRing certificate, CertificationType certificationType)
Create a certification of the givenCertificationType
over 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.GENERIC
to 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 givenCertificationType
over 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 aTrustSignature
packet over a certificate. This can be used to mark a certificate as a trusted introducer.- Parameters:
certificate
- certificatetrustworthiness
- trustworthiness of the certificate- Returns:
- API
-
-