Class DOMXMLSignature
java.lang.Object
org.apache.jcp.xml.dsig.internal.dom.DOMStructure
org.apache.jcp.xml.dsig.internal.dom.DOMXMLSignature
- All Implemented Interfaces:
XMLSignature, XMLStructure
DOM-based implementation of XMLSignature.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface XMLSignature
XMLSignature.SignatureValue -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate KeyInfoprivate KeySelectorResultprivate Elementprivate static final org.slf4j.Loggerprivate Documentprivate SignedInfoprivate Elementprivate Map<String, XMLStructure> private XMLSignature.SignatureValueprivate booleanprivate booleanFields inherited from interface XMLSignature
XMLNS -
Constructor Summary
ConstructorsConstructorDescriptionDOMXMLSignature(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objs, String id, String signatureValueId) Creates aDOMXMLSignaturefrom the specified components.DOMXMLSignature(Element sigElem, XMLCryptoContext context, Provider provider) Creates aDOMXMLSignaturefrom XML. -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddigestReference(DOMReference ref, XMLSignContext signContext) booleangetId()inthashCode()voidmarshal(Node parent, String dsPrefix, DOMCryptoContext context) voidmarshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) voidsign(XMLSignContext signContext) booleanMethods inherited from class DOMStructure
isFeatureSupportedMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface XMLStructure
isFeatureSupported
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
id
-
sv
-
ki
-
objects
-
si
-
ownerDoc
-
localSigElem
-
sigElem
-
validationStatus
private boolean validationStatus -
validated
private boolean validated -
ksr
-
signatureIdMap
-
-
Constructor Details
-
DOMXMLSignature
public DOMXMLSignature(SignedInfo si, KeyInfo ki, List<? extends XMLObject> objs, String id, String signatureValueId) Creates aDOMXMLSignaturefrom the specified components.- Parameters:
si- theSignedInfoki- theKeyInfo, ornullif not specifiedobjs- a list ofXMLObjects ornullif not specified. The list is copied to protect against subsequent modification.id- an optional id (specifynullto omit)signatureValueId- an optional id (specifynullto omit)- Throws:
NullPointerException- ifsiisnull
-
DOMXMLSignature
public DOMXMLSignature(Element sigElem, XMLCryptoContext context, Provider provider) throws MarshalException Creates aDOMXMLSignaturefrom XML.- Parameters:
sigElem- Signature element- Throws:
MarshalException- if XMLSignature cannot be unmarshalled
-
-
Method Details
-
getId
- Specified by:
getIdin interfaceXMLSignature
-
getKeyInfo
- Specified by:
getKeyInfoin interfaceXMLSignature
-
getSignedInfo
- Specified by:
getSignedInfoin interfaceXMLSignature
-
getObjects
- Specified by:
getObjectsin interfaceXMLSignature
-
getSignatureValue
- Specified by:
getSignatureValuein interfaceXMLSignature
-
getKeySelectorResult
- Specified by:
getKeySelectorResultin interfaceXMLSignature
-
marshal
- Specified by:
marshalin classDOMStructure- Throws:
MarshalException
-
marshal
public void marshal(Node parent, Node nextSibling, String dsPrefix, DOMCryptoContext context) throws MarshalException - Throws:
MarshalException
-
validate
- Specified by:
validatein interfaceXMLSignature- Throws:
XMLSignatureException
-
sign
- Specified by:
signin interfaceXMLSignature- Throws:
MarshalExceptionXMLSignatureException
-
equals
-
hashCode
-
digestReference
private void digestReference(DOMReference ref, XMLSignContext signContext) throws XMLSignatureException - Throws:
XMLSignatureException
-