public class CRLRefImpl extends XadesDOMStructure implements CRLRef
CRLRef
element that supports the DOM
XML processing and representation mechanism.Constructor and Description |
---|
CRLRefImpl(CRLIdentifierImpl crlIdentifier,
DigestAlgAndValueImpl digestAlgAndValue)
Creates a new instance of this
CRLRefImpl with the specified
provider config, CRL identifier and digest value. |
CRLRefImpl(CRLIdentifierImpl crlIdentifier,
iaik.xml.crypto.dsig.DigestMethodImpl digestMethod,
InputStream digestInputStream)
Creates a new instance of this
CRLRefImpl with the given CRL
identifier, digest method and input for the digest computation. |
CRLRefImpl(DOMCryptoContext context,
Node node)
Creates a new instance of this
CRLRefImpl with the given
context and node to unmarshal from. |
CRLRefImpl(X509CRL x509CRL,
iaik.xml.crypto.dsig.DigestMethodImpl digestMethod,
String uri)
Creates a new instance of this
CRLRefImpl with the specified
provider config, X509 CRL, digest method and URI reference. |
Modifier and Type | Method and Description |
---|---|
protected List |
getChildStructures() |
CRLIdentifier |
getCRLIdentifier()
Returns the CRL identifier
|
DigestAlgAndValue |
getDigestAlgAndValue()
Returns the digest of the referenced CRL.
|
String |
getLocalName() |
Node |
marshal(DOMCryptoContext context,
Node parent,
Node nextSibling) |
protected void |
putChildStructure(iaik.xml.crypto.dom.DOMStructure childStructure) |
String |
toString() |
boolean |
validate(XMLCryptoContext context,
Data digestInput)
Validates the digest value.
|
getInstance, getNamespace, getParentQualifyingPropertiesOf, getParentSignatureOf
addBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshalAttributes, marshalElement, marshalIDAttribute, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, unmarshal, unmarshalAttributes, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFeatureSupported
public CRLRefImpl(DOMCryptoContext context, Node node) throws MarshalException
CRLRefImpl
with the given
context and node to unmarshal from.context
- the contextnode
- the node to unmarshal fromMarshalException
- if an exception occurs during unmarshalingpublic CRLRefImpl(CRLIdentifierImpl crlIdentifier, DigestAlgAndValueImpl digestAlgAndValue)
CRLRefImpl
with the specified
provider config, CRL identifier and digest value.crlIdentifier
- the CRL identifierdigestAlgAndValue
- the digest valueNullPointerException
- if config
, crlIdentifier
or
digestAlgAndValue
is null
public CRLRefImpl(X509CRL x509CRL, iaik.xml.crypto.dsig.DigestMethodImpl digestMethod, String uri)
CRLRefImpl
with the specified
provider config, X509 CRL, digest method and URI reference.x509CRL
- the X509 CRLdigestMethod
- the digest methoduri
- the URI reference of a copy of the CRL (may be null
)NullPointerException
- if config
, x509CRL
or
digestMethod
is null
IllegalArgumentException
- if x509CRL
is not a valid X509 CRLpublic CRLRefImpl(CRLIdentifierImpl crlIdentifier, iaik.xml.crypto.dsig.DigestMethodImpl digestMethod, InputStream digestInputStream)
CRLRefImpl
with the given CRL
identifier, digest method and input for the digest computation.crlIdentifier
- the CRL identifierdigestMethod
- the digest methoddigestInputStream
- the input for the digest computationNullPointerException
- if config
, crlIdentifier
,
digestMethod
or digestInputStream
is
null
public DigestAlgAndValue getDigestAlgAndValue()
CRLRef
getDigestAlgAndValue
in interface CRLRef
CRLRef.getDigestAlgAndValue()
public CRLIdentifier getCRLIdentifier()
CRLRef
getCRLIdentifier
in interface CRLRef
CRLRef.getCRLIdentifier()
public String getLocalName()
getLocalName
in class iaik.xml.crypto.dom.DOMStructure
DOMStructure.getLocalName()
protected List getChildStructures()
getChildStructures
in class iaik.xml.crypto.dom.DOMStructure
DOMStructure.getChildStructures()
protected void putChildStructure(iaik.xml.crypto.dom.DOMStructure childStructure) throws MarshalException
putChildStructure
in class iaik.xml.crypto.dom.DOMStructure
MarshalException
DOMStructure.putChildStructure(DOMStructure)
public Node marshal(DOMCryptoContext context, Node parent, Node nextSibling) throws MarshalException
marshal
in class iaik.xml.crypto.dom.DOMStructure
MarshalException
DOMStructure.marshal(DOMCryptoContext, Node, Node)
public boolean validate(XMLCryptoContext context, Data digestInput) throws XMLSignatureException
CRLRef
The input for the digest computation is obtained from the given
digestInput
if present, or alternatively from the dereferenced
URI
reference of the
CRLIdentifier
. If no digestInput
is given or no
URI reference is present or could be dereferenced successfully an
XMLSignatureException
is thrown. If no digestInput
is
given the method only validates the reference the first time it is invoked.
On subsequent invocations, it returns a cached result unless a digestinput
is provided.
validate
in interface CRLRef
context
- the validation contextdigestInput
- the input for the digest computationtrue
if the digest value validated successfully;
false
otherwiseXMLSignatureException
- if an unexpected exception occurs while validating the digest valueCRLRef.validate(javax.xml.crypto.XMLCryptoContext,
javax.xml.crypto.Data)
public String toString()
toString
in class iaik.xml.crypto.dom.DOMStructure
© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC