Package com.pd4ml.pdf.sign
Class CertificateUtils.SigningIdentity
- java.lang.Object
-
- com.pd4ml.pdf.sign.CertificateUtils.SigningIdentity
-
- Enclosing class:
- CertificateUtils
public static final class CertificateUtils.SigningIdentity extends java.lang.ObjectHolds the certificate chain to sign with, plus however this identity's private key operations actually get performed: an in-processPrivateKey(PKCS#12;getProvider()isnull, any JCA provider -- normally BouncyCastle -- may perform the RSA/EC operation), an opaquePrivateKeyhandle tied to one specificProvider(PKCS#11; that exact provider instance must perform the operation, since the key material never leaves the token), or no local key at all, only aRemoteSigner(cloud KMS).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.Certificate[]getCertificateChain()A defensive copy of the certificate chain -- mutating the returned array never affects this identity.java.security.PrivateKeygetPrivateKey()The local private key handle, ornullfor agetRemoteSigner()-backed (KMS) identity.java.security.ProvidergetProvider()The JCAProviderthat MUST perform anySignatureoperation withgetPrivateKey()(set for a PKCS#11-backed identity, whose key is non-extractable and only usable through the exact provider instance that opened the token session), ornullif the key has no such constraint (PKCS#12).RemoteSignergetRemoteSigner()The remote signing callback for a KMS-backed identity, ornullfor a local (PKCS#12/PKCS#11) key.java.security.cert.X509CertificategetSigningCertificate()
-
-
-
Method Detail
-
getPrivateKey
public java.security.PrivateKey getPrivateKey()
The local private key handle, ornullfor agetRemoteSigner()-backed (KMS) identity.
-
getCertificateChain
public java.security.cert.Certificate[] getCertificateChain()
A defensive copy of the certificate chain -- mutating the returned array never affects this identity.
-
getSigningCertificate
public java.security.cert.X509Certificate getSigningCertificate()
-
getProvider
public java.security.Provider getProvider()
The JCAProviderthat MUST perform anySignatureoperation withgetPrivateKey()(set for a PKCS#11-backed identity, whose key is non-extractable and only usable through the exact provider instance that opened the token session), ornullif the key has no such constraint (PKCS#12).
-
getRemoteSigner
public RemoteSigner getRemoteSigner()
The remote signing callback for a KMS-backed identity, ornullfor a local (PKCS#12/PKCS#11) key.
-
-