XMLValidateContext. This class contains additional
methods to specify the location in a DOM tree where an XMLSignature
is to be unmarshalled and validated from.
Note that the behavior of an unmarshalled XMLSignature
is undefined if the contents of the underlying DOM tree are modified by the
caller after the XMLSignature is created.
Also, note that DOMValidateContext instances can contain
information and state specific to the XML signature structure it is
used with. The results are unpredictable if a
DOMValidateContext is used with different signature structures
(for example, you should not use the same DOMValidateContext
instance to validate two different XMLSignature objects).
Implementation Note
The JDK implementation supports the following properties that can be set
using the setProperty method.
org.jcp.xml.dsig.secureValidation: value must be a
Boolean. When enabled, validation of XML signatures are subject
to stricter checking of algorithms and other constraints as specified by the
jdk.xml.dsig.secureValidationPolicy security property.
The default value if not specified is Boolean.TRUE.
The mode can be disabled by setting the property to Boolean.FALSE.
The mode can also be enabled or disabled by setting the
org.jcp.xml.dsig.secureValidation system property to
"true" or "false". Any other value for the system property is also treated
as "false". If the system property is set, it supersedes the
DOMValidateContext property value.
org.jcp.xml.dsig.validateManifests: value
must be a Boolean. If enabled, the references in manifest
elements (if exist) are validated during signature validation.
The default value if not specified is Boolean.FALSE.
org.jcp.xml.dsig.internal.dom.SignatureProvider: value
must be a Provider. If specified, the underlying Signature
will be instantiated from this provider.
XMLSignatureFactory#unmarshalXMLSignature(XMLValidateContext)
| Access | Constructor and Description |
|---|---|
| public | DOMValidateContext(KeySelector
a key selector for finding a validation key ks, Node the node node)Creates a |
| public | DOMValidateContext(Key
the validating key validatingKey, Node the node node)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public Node | |
| private void | |
| public void |
| node | back to summary |
|---|---|
| private Node node | |
| DOMValidateContext | back to summary |
|---|---|
| public DOMValidateContext(KeySelector ks, Node node) Creates a
| |
| DOMValidateContext | back to summary |
|---|---|
| public DOMValidateContext(Key validatingKey, Node node) Creates a
| |
| getNode | back to summary |
|---|---|
| public Node getNode() Returns the node.
| |
| init | back to summary |
|---|---|
| private void init(Node node, KeySelector ks) | |
| setNode | back to summary |
|---|---|
| public void setNode(Node node) Sets the node.
| |