@UriParams public class DefaultSignerInfo extends DefaultCryptoCmsConfiguration implements SignerInfo
| Constructor and Description |
|---|
DefaultSignerInfo() |
| Modifier and Type | Method and Description |
|---|---|
X509Certificate |
getCertificate(org.apache.camel.Exchange exchange) |
Certificate[] |
getCertificateChain(org.apache.camel.Exchange exchange)
Certificates which should be added to the certificate list of the Signed
Data instance which belong to the private key.
|
protected char[] |
getPassword(org.apache.camel.Exchange exchange) |
PrivateKey |
getPrivateKey(org.apache.camel.Exchange exchange) |
protected String |
getPrivateKeyAlias(org.apache.camel.Exchange exchange) |
String |
getSignatureAlgorithm(org.apache.camel.Exchange exchange) |
org.bouncycastle.cms.CMSAttributeTableGenerator |
getSignedAttributeGenerator(org.apache.camel.Exchange exchange)
Returns the generator for the signed attributes.
|
org.bouncycastle.cms.CMSAttributeTableGenerator |
getUnsignedAttributeGenerator(org.apache.camel.Exchange exchange)
Returns the generator for the unsigned attributes.
|
void |
setIncludeCertificates(boolean includeCertificates)
If true then the certificate chain corresponding to the alias of
the private key is added to the certificate list of the Signed Data
instance.
|
void |
setPassword(char[] password)
Password of the private key.
|
void |
setPrivateKeyAlias(String privateKeyAlias)
Alias of the private key entry in the keystore which is used for signing.
|
void |
setSignatureAlgorithm(String signatureAlgorithm)
Signature algorithm.
|
void |
setSignedAttributeGenerator(org.bouncycastle.cms.CMSAttributeTableGenerator signedAttributeGenerator)
Signed attributes of the Signed Data instance.
|
void |
setUnsignedAttributeGenerator(org.bouncycastle.cms.CMSAttributeTableGenerator unsignedAttributeGenerator)
Unsigned attributes of the Signed Data instance.
|
String |
toString() |
getKeyStore, getKeyStoreParameters, setKeyStore, setKeyStoreParameterspublic void setPassword(char[] password)
protected char[] getPassword(org.apache.camel.Exchange exchange)
throws CryptoCmsException
CryptoCmsExceptionprotected String getPrivateKeyAlias(org.apache.camel.Exchange exchange) throws CryptoCmsException
CryptoCmsExceptionpublic void setPrivateKeyAlias(String privateKeyAlias)
public void setSignatureAlgorithm(String signatureAlgorithm)
Attention, the signature algorithm must fit to the signer private key.
public void setIncludeCertificates(boolean includeCertificates)
public String getSignatureAlgorithm(org.apache.camel.Exchange exchange) throws CryptoCmsException
getSignatureAlgorithm in interface SignerInfoCryptoCmsExceptionpublic PrivateKey getPrivateKey(org.apache.camel.Exchange exchange) throws CryptoCmsException
getPrivateKey in interface SignerInfoCryptoCmsExceptionpublic X509Certificate getCertificate(org.apache.camel.Exchange exchange) throws CryptoCmsException
getCertificate in interface SignerInfoCryptoCmsExceptionpublic Certificate[] getCertificateChain(org.apache.camel.Exchange exchange) throws CryptoCmsException
SignerInfogetCertificateChain in interface SignerInfoCryptoCmsExceptionpublic void setSignedAttributeGenerator(org.bouncycastle.cms.CMSAttributeTableGenerator signedAttributeGenerator)
public void setUnsignedAttributeGenerator(org.bouncycastle.cms.CMSAttributeTableGenerator unsignedAttributeGenerator)
public org.bouncycastle.cms.CMSAttributeTableGenerator getSignedAttributeGenerator(org.apache.camel.Exchange exchange)
throws CryptoCmsException
SignerInfogetSignedAttributeGenerator in interface SignerInfoCryptoCmsExceptionpublic org.bouncycastle.cms.CMSAttributeTableGenerator getUnsignedAttributeGenerator(org.apache.camel.Exchange exchange)
throws CryptoCmsException
SignerInfonull, then no unsigned attribute is generated.getUnsignedAttributeGenerator in interface SignerInfoCryptoCmsExceptionApache Camel