org.apache.jcp.xml.dsig.internal.dom
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:
- SignedInfo, XMLStructure
public final class DOMSignedInfo
- extends DOMStructure
- implements SignedInfo
DOM-based implementation of SignedInfo.
- Author:
- Sean Mullan
|
Field Summary |
static int |
MAXIMUM_REFERENCE_COUNT
The maximum number of references per Manifest, if secure validation is enabled. |
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
DOMSignedInfo
public DOMSignedInfo(CanonicalizationMethod cm,
SignatureMethod sm,
List<? extends Reference> references)
- Creates a
DOMSignedInfo from the specified parameters. Use
this constructor when the Id is not specified.
- Parameters:
cm - the canonicalization methodsm - the signature methodreferences - the list of references. The list is copied.
- Throws:
NullPointerException - if
cm, sm, or references is
null
IllegalArgumentException - if references is empty
ClassCastException - if any of the references are not of
type Reference
DOMSignedInfo
public DOMSignedInfo(CanonicalizationMethod cm,
SignatureMethod sm,
List<? extends Reference> references,
String id)
- Creates a
DOMSignedInfo from 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 this
SignedInfo to be referenced by other signatures and
objects
- Throws:
NullPointerException - if cm, sm,
or references is null
IllegalArgumentException - if references is empty
ClassCastException - if any of the references are not of
type Reference
DOMSignedInfo
public DOMSignedInfo(Element siElem,
XMLCryptoContext context,
Provider provider)
throws MarshalException
- Creates a
DOMSignedInfo from an element.
- Parameters:
siElem - a SignedInfo element
- Throws:
MarshalException
getCanonicalizationMethod
public CanonicalizationMethod getCanonicalizationMethod()
- Specified by:
getCanonicalizationMethod in interface SignedInfo
getSignatureMethod
public SignatureMethod getSignatureMethod()
- Specified by:
getSignatureMethod in interface SignedInfo
getId
public String getId()
- Specified by:
getId in interface SignedInfo
getReferences
public List<Reference> getReferences()
- Specified by:
getReferences in interface SignedInfo
getCanonicalizedData
public InputStream getCanonicalizedData()
- Specified by:
getCanonicalizedData in interface SignedInfo
canonicalize
public void canonicalize(XMLCryptoContext context,
ByteArrayOutputStream bos)
throws XMLSignatureException
- Throws:
XMLSignatureException
marshal
public void marshal(XmlWriter xwriter,
String dsPrefix,
XMLCryptoContext context)
throws MarshalException
- Specified by:
marshal in class DOMStructure
- Throws:
MarshalException
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
getSignedInfoReferences
public static List<Reference> getSignedInfoReferences(SignedInfo si)
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.