@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, setKeyStoreParameters
public void setPassword(char[] password)
protected char[] getPassword(org.apache.camel.Exchange exchange) throws CryptoCmsException
CryptoCmsException
protected String getPrivateKeyAlias(org.apache.camel.Exchange exchange) throws CryptoCmsException
CryptoCmsException
public 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 SignerInfo
CryptoCmsException
public PrivateKey getPrivateKey(org.apache.camel.Exchange exchange) throws CryptoCmsException
getPrivateKey
in interface SignerInfo
CryptoCmsException
public X509Certificate getCertificate(org.apache.camel.Exchange exchange) throws CryptoCmsException
getCertificate
in interface SignerInfo
CryptoCmsException
public Certificate[] getCertificateChain(org.apache.camel.Exchange exchange) throws CryptoCmsException
SignerInfo
getCertificateChain
in interface SignerInfo
CryptoCmsException
public 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
SignerInfo
getSignedAttributeGenerator
in interface SignerInfo
CryptoCmsException
public org.bouncycastle.cms.CMSAttributeTableGenerator getUnsignedAttributeGenerator(org.apache.camel.Exchange exchange) throws CryptoCmsException
SignerInfo
null
, then no unsigned attribute is generated.getUnsignedAttributeGenerator
in interface SignerInfo
CryptoCmsException
Apache Camel