public class XmlSignerConfiguration extends XmlSignatureConfiguration
Constructor and Description |
---|
XmlSignerConfiguration() |
Modifier and Type | Method and Description |
---|---|
XmlSignerConfiguration |
copy() |
Boolean |
getAddKeyInfoReference() |
AlgorithmMethod |
getCanonicalizationMethod() |
String |
getCanonicalizationMethodName() |
String |
getContentObjectId() |
String |
getContentReferenceType() |
String |
getContentReferenceUri() |
String |
getDigestAlgorithm() |
KeyAccessor |
getKeyAccessor() |
String |
getKeyAccessorName() |
String |
getParentLocalName() |
String |
getParentNamespace() |
Boolean |
getPlainText() |
String |
getPlainTextEncoding() |
String |
getPrefixForXmlSignatureNamespace() |
XmlSignatureProperties |
getProperties() |
String |
getPropertiesName() |
String |
getSignatureAlgorithm() |
String |
getSignatureId() |
List<AlgorithmMethod> |
getTransformMethods() |
String |
getTransformMethodsName() |
List<XPathFilterParameterSpec> |
getXpathsToIdAttributes() |
void |
setAddKeyInfoReference(Boolean addKeyInfoReference)
In order to protect the KeyInfo element from tampering you can add a
reference to the signed info element so that it is protected via the
signature value.
|
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setCanonicalizationMethod(AlgorithmMethod canonicalizationMethod) |
void |
setCanonicalizationMethod(String canonicalizationMethodName)
Sets the reference name for a AlgorithmMethod that can be found in the
registry.
|
void |
setCanonicalizationMethodName(String canonicalizationMethodName) |
void |
setContentObjectId(String contentObjectId)
Sets the content object Id attribute value.
|
void |
setContentReferenceType(String referenceType) |
void |
setContentReferenceUri(String referenceUri)
Reference URI for the content to be signed.
|
void |
setDigestAlgorithm(String digestAlgorithm) |
void |
setKeyAccessor(KeyAccessor keyAccessor) |
void |
setKeyAccessor(String keyAccessorName)
Sets the reference name for a KeyAccessor that can be found in the
registry.
|
void |
setKeyAccessorName(String keyAccessorName) |
void |
setParentLocalName(String parentLocalName)
Local name of the parent element to which the XML signature element will
be added.
|
void |
setParentNamespace(String parentNamespace)
Namespace of the parent element to which the XML signature element will
be added.
|
void |
setPlainText(Boolean plainText) |
void |
setPlainTextEncoding(String plainTextEncoding) |
void |
setPrefixForXmlSignatureNamespace(String prefixForXmlSignatureNamespace)
Namespace prefix for the XML signature namespace
"http://www.w3.org/2000/09/xmldsig#".
|
void |
setProperties(String propertiesName)
Sets the reference name for a XmlSignatureProperties that can be found in
the registry.
|
void |
setProperties(XmlSignatureProperties properties) |
void |
setPropertiesName(String propertiesName) |
void |
setSignatureAlgorithm(String signatureAlgorithm)
Signature algorithm.
|
void |
setSignatureId(String signatureId)
Sets the signature Id.
|
void |
setTransformMethods(List<AlgorithmMethod> transformMethods) |
void |
setTransformMethods(String transformMethodsName)
Sets the reference name for a List
|
void |
setTransformMethodsName(String transformMethodsName) |
void |
setXpathsToIdAttributes(List<XPathFilterParameterSpec> xpathsToIdAttributes)
Define the elements which are signed in the detached case via XPATH
expressions to ID attributes (attributes of type ID).
|
getBaseUri, getCamelContext, getClearHeaders, getCryptoContextProperties, getDisallowDoctypeDecl, getOmitXmlDeclaration, getSchemaResourceUri, getUriDereferencer, setBaseUri, setClearHeaders, setCryptoContextProperties, setDisallowDoctypeDecl, setOmitXmlDeclaration, setSchemaResourceUri, setUriDereferencer
public XmlSignerConfiguration copy()
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
setCamelContext
in class XmlSignatureConfiguration
public KeyAccessor getKeyAccessor()
public void setKeyAccessor(KeyAccessor keyAccessor)
public void setKeyAccessor(String keyAccessorName)
public AlgorithmMethod getCanonicalizationMethod()
public void setCanonicalizationMethod(AlgorithmMethod canonicalizationMethod)
public void setCanonicalizationMethod(String canonicalizationMethodName)
public List<AlgorithmMethod> getTransformMethods()
public void setTransformMethods(List<AlgorithmMethod> transformMethods)
public void setTransformMethods(String transformMethodsName)
public String getSignatureAlgorithm()
public void setSignatureAlgorithm(String signatureAlgorithm)
signatureAlgorithm
- signature algorithmpublic String getDigestAlgorithm()
public void setDigestAlgorithm(String digestAlgorithm)
public Boolean getAddKeyInfoReference()
public void setAddKeyInfoReference(Boolean addKeyInfoReference)
Only relevant when a KeyInfo is returned by KeyAccessor
. and
KeyInfo.getId()
is not null
.
addKeyInfoReference
- boolean valuepublic String getPrefixForXmlSignatureNamespace()
public void setPrefixForXmlSignatureNamespace(String prefixForXmlSignatureNamespace)
null
or an empty value is set then no prefix is used for
the XML signature namespace.
See best practice http://www.w3.org/TR/xmldsig-bestpractices/#signing-xml- without-namespaces
prefixForXmlSignatureNamespace
- prefixpublic String getParentLocalName()
public void setParentLocalName(String parentLocalName)
null
. The value must be null
for enveloping and
detached XML signature.
This parameter for enveloped signature and the parameter
setXpathsToIdAttributes(List)
for detached signature must not be
set in the same configuration.
parentLocalName
- local namepublic String getParentNamespace()
public void setParentNamespace(String parentNamespace)
public String getContentObjectId()
public void setContentObjectId(String contentObjectId)
null
value, then a new UUID will
be generated. Only used in the enveloping case.contentObjectId
- public String getSignatureId()
public void setSignatureId(String signatureId)
signatureId
- public String getContentReferenceUri()
public void setContentReferenceUri(String referenceUri)
XmlSignatureConfiguration.setSchemaResourceUri(String)
) must also be
set because the schema validator will then find out which attributes are
ID attributes. Will be ignored in the enveloping or detached case.referenceUri
- public String getContentReferenceType()
public void setContentReferenceType(String referenceType)
public Boolean getPlainText()
public void setPlainText(Boolean plainText)
public String getPlainTextEncoding()
public void setPlainTextEncoding(String plainTextEncoding)
public XmlSignatureProperties getProperties()
public void setProperties(XmlSignatureProperties properties)
public void setProperties(String propertiesName)
public String getKeyAccessorName()
public void setKeyAccessorName(String keyAccessorName)
public String getCanonicalizationMethodName()
public void setCanonicalizationMethodName(String canonicalizationMethodName)
public String getTransformMethodsName()
public void setTransformMethodsName(String transformMethodsName)
public String getPropertiesName()
public void setPropertiesName(String propertiesName)
public List<XPathFilterParameterSpec> getXpathsToIdAttributes()
public void setXpathsToIdAttributes(List<XPathFilterParameterSpec> xpathsToIdAttributes)
You can also set the XPATH list dynamically via the header
XmlSignatureConstants.HEADER_XPATHS_TO_ID_ATTRIBUTES
.
The parameter setParentLocalName(String)
for enveloped signature
and this parameter for detached signature must not be set in the same
configuration.
xpathsToIdAttributes
- Apache Camel