Class JCECredentials
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.credentials.impl.JCECredentials
-
- All Implemented Interfaces:
Credentials
public class JCECredentials extends java.lang.Object implements Credentials
JCE Credentials with JDK1.5 HSM support.
-
-
Constructor Summary
Constructors Constructor Description JCECredentials(PrivateKeyHolder keyHolder, byte[] derEncodedCert, byte[][] derEncodedCertChain)
JCECredentials(PrivateKeyHolder keyHolder, java.security.cert.X509Certificate cert, java.security.cert.Certificate[] certChain)
JCECredentials(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, java.security.cert.Certificate[] certChain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.security.cert.X509Certificate
getCertificate()
Gets the x509 certificate associated with this credential.java.security.cert.Certificate[]
getCertificateChain()
Gets the certificate chain associated with this credential.java.security.PrivateKey
getPrivateKey()
Gets the private key associate with this credential.java.security.Provider
getProvider()
Get a Security Provider for the private keyjava.lang.String
getProviderName()
Get the name of the key Providerboolean
isHSM()
void
setHSM(boolean isHSM)
void
setProviderName(java.lang.String providerName)
-
-
-
Constructor Detail
-
JCECredentials
public JCECredentials(PrivateKeyHolder keyHolder, byte[] derEncodedCert, byte[][] derEncodedCertChain) throws PDFInvalidParameterException
- Throws:
PDFInvalidParameterException
-
JCECredentials
public JCECredentials(java.security.PrivateKey privateKey, java.security.cert.X509Certificate cert, java.security.cert.Certificate[] certChain)
-
JCECredentials
public JCECredentials(PrivateKeyHolder keyHolder, java.security.cert.X509Certificate cert, java.security.cert.Certificate[] certChain) throws java.security.NoSuchAlgorithmException, java.security.spec.InvalidKeySpecException, PDFInvalidParameterException
- Throws:
java.security.NoSuchAlgorithmException
java.security.spec.InvalidKeySpecException
PDFInvalidParameterException
-
-
Method Detail
-
setProviderName
public void setProviderName(java.lang.String providerName)
-
isHSM
public boolean isHSM()
- Specified by:
isHSM
in interfaceCredentials
-
setHSM
public void setHSM(boolean isHSM)
-
getPrivateKey
public java.security.PrivateKey getPrivateKey()
Gets the private key associate with this credential.- Returns:
- PrivateKey
-
getProviderName
public java.lang.String getProviderName()
Get the name of the key Provider- Returns:
- String
-
getProvider
public java.security.Provider getProvider()
Get a Security Provider for the private key- Returns:
- java.security.Provider
-
getCertificate
public java.security.cert.X509Certificate getCertificate()
Gets the x509 certificate associated with this credential.- Returns:
- X509Certificate
-
getCertificateChain
public java.security.cert.Certificate[] getCertificateChain()
Gets the certificate chain associated with this credential. This method is useful when client already have an ordered certificate chain.- Returns:
- Certificate[]
-
-