Class DOMSignedInfo
- java.lang.Object
-
- org.apache.jcp.xml.dsig.internal.dom.BaseStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMStructure
-
- org.apache.jcp.xml.dsig.internal.dom.DOMSignedInfo
-
- All Implemented Interfaces:
javax.xml.crypto.dsig.SignedInfo,javax.xml.crypto.XMLStructure
public final class DOMSignedInfo extends DOMStructure implements javax.xml.crypto.dsig.SignedInfo
DOM-based implementation of SignedInfo.- Author:
- Sean Mullan
-
-
Field Summary
Fields Modifier and Type Field Description static intMAXIMUM_REFERENCE_COUNTThe maximum number of references per Manifest, if secure validation is enabled.
-
Constructor Summary
Constructors Constructor Description DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references)Creates aDOMSignedInfofrom the specified parameters.DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references, java.lang.String id)Creates aDOMSignedInfofrom the specified parameters.DOMSignedInfo(org.w3c.dom.Element siElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider)Creates aDOMSignedInfofrom an element.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcanonicalize(javax.xml.crypto.XMLCryptoContext context, java.io.ByteArrayOutputStream bos)booleanequals(java.lang.Object o)javax.xml.crypto.dsig.CanonicalizationMethodgetCanonicalizationMethod()java.io.InputStreamgetCanonicalizedData()java.lang.StringgetId()java.util.List<javax.xml.crypto.dsig.Reference>getReferences()javax.xml.crypto.dsig.SignatureMethodgetSignatureMethod()static java.util.List<javax.xml.crypto.dsig.Reference>getSignedInfoReferences(javax.xml.crypto.dsig.SignedInfo si)inthashCode()voidmarshal(XmlWriter xwriter, java.lang.String dsPrefix, javax.xml.crypto.XMLCryptoContext context)-
Methods inherited from class org.apache.jcp.xml.dsig.internal.dom.BaseStructure
isFeatureSupported, textOfNode
-
-
-
-
Field Detail
-
MAXIMUM_REFERENCE_COUNT
public static final int MAXIMUM_REFERENCE_COUNT
The maximum number of references per Manifest, if secure validation is enabled.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DOMSignedInfo
public DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references)Creates aDOMSignedInfofrom the specified parameters. Use this constructor when theIdis not specified.- Parameters:
cm- the canonicalization methodsm- the signature methodreferences- the list of references. The list is copied.- Throws:
java.lang.NullPointerException- ifcm,sm, orreferencesisnulljava.lang.IllegalArgumentException- ifreferencesis emptyjava.lang.ClassCastException- if any of the references are not of typeReference
-
DOMSignedInfo
public DOMSignedInfo(javax.xml.crypto.dsig.CanonicalizationMethod cm, javax.xml.crypto.dsig.SignatureMethod sm, java.util.List<? extends javax.xml.crypto.dsig.Reference> references, java.lang.String id)Creates aDOMSignedInfofrom the specified parameters.- Parameters:
cm- the canonicalization methodsm- the signature methodreferences- the list of references. The list is copied.id- an optional identifer that will allow thisSignedInfoto be referenced by other signatures and objects- Throws:
java.lang.NullPointerException- ifcm,sm, orreferencesisnulljava.lang.IllegalArgumentException- ifreferencesis emptyjava.lang.ClassCastException- if any of the references are not of typeReference
-
DOMSignedInfo
public DOMSignedInfo(org.w3c.dom.Element siElem, javax.xml.crypto.XMLCryptoContext context, java.security.Provider provider) throws javax.xml.crypto.MarshalExceptionCreates aDOMSignedInfofrom an element.- Parameters:
siElem- a SignedInfo element- Throws:
javax.xml.crypto.MarshalException
-
-
Method Detail
-
getCanonicalizationMethod
public javax.xml.crypto.dsig.CanonicalizationMethod getCanonicalizationMethod()
- Specified by:
getCanonicalizationMethodin interfacejavax.xml.crypto.dsig.SignedInfo
-
getSignatureMethod
public javax.xml.crypto.dsig.SignatureMethod getSignatureMethod()
- Specified by:
getSignatureMethodin interfacejavax.xml.crypto.dsig.SignedInfo
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfacejavax.xml.crypto.dsig.SignedInfo
-
getReferences
public java.util.List<javax.xml.crypto.dsig.Reference> getReferences()
- Specified by:
getReferencesin interfacejavax.xml.crypto.dsig.SignedInfo
-
getCanonicalizedData
public java.io.InputStream getCanonicalizedData()
- Specified by:
getCanonicalizedDatain interfacejavax.xml.crypto.dsig.SignedInfo
-
canonicalize
public void canonicalize(javax.xml.crypto.XMLCryptoContext context, java.io.ByteArrayOutputStream bos) throws javax.xml.crypto.dsig.XMLSignatureException- Throws:
javax.xml.crypto.dsig.XMLSignatureException
-
marshal
public void marshal(XmlWriter xwriter, java.lang.String dsPrefix, javax.xml.crypto.XMLCryptoContext context) throws javax.xml.crypto.MarshalException
- Specified by:
marshalin classDOMStructure- Throws:
javax.xml.crypto.MarshalException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
getSignedInfoReferences
public static java.util.List<javax.xml.crypto.dsig.Reference> getSignedInfoReferences(javax.xml.crypto.dsig.SignedInfo si)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-