public class OCSPRefImpl extends XadesDOMStructure implements OCSPRef
OCSPRef
element that supports the DOM
XML processing and representation mechanism.Constructor and Description |
---|
OCSPRefImpl(DOMCryptoContext context,
Node node) |
OCSPRefImpl(OCSPIdentifierImpl ocspIdentifer,
DigestAlgAndValueImpl digestAlgAndValue) |
OCSPRefImpl(OCSPIdentifierImpl ocspIdentifier,
iaik.xml.crypto.dsig.DigestMethodImpl digestMethod,
InputStream digestInputStream) |
OCSPRefImpl(OCSPResponse ocspResponse,
iaik.xml.crypto.dsig.DigestMethodImpl digestMethod,
String uri) |
Modifier and Type | Method and Description |
---|---|
protected List |
getChildStructures() |
DigestAlgAndValue |
getDigestAlgAndValue()
Returns the digest of the referenced OCSP response.
|
Data |
getDigestInputData(XMLCryptoContext context)
Gets the digest input data.
|
String |
getLocalName() |
OCSPIdentifier |
getOCSPIdentifier()
Returns the OCSP identifier.
|
Node |
marshal(DOMCryptoContext context,
Node parent,
Node nextSibling) |
protected void |
putChildStructure(iaik.xml.crypto.dom.DOMStructure childStructure) |
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, toString, unmarshal, unmarshalAttributes, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFeatureSupported
public OCSPRefImpl(DOMCryptoContext context, Node node) throws MarshalException
MarshalException
public OCSPRefImpl(OCSPIdentifierImpl ocspIdentifer, DigestAlgAndValueImpl digestAlgAndValue)
ocspIdentifer
- digestAlgAndValue
- public OCSPRefImpl(OCSPResponse ocspResponse, iaik.xml.crypto.dsig.DigestMethodImpl digestMethod, String uri)
ocspResponse
- The basic OCSP response.digestMethod
- The digest method to use to digest the basic OCSP response.uri
- The URI of an archived version of the OCSP response.public OCSPRefImpl(OCSPIdentifierImpl ocspIdentifier, iaik.xml.crypto.dsig.DigestMethodImpl digestMethod, InputStream digestInputStream)
ocspIdentifier
- digestMethod
- digestInputStream
- public DigestAlgAndValue getDigestAlgAndValue()
OCSPRef
getDigestAlgAndValue
in interface OCSPRef
OCSPRef.getDigestAlgAndValue()
public OCSPIdentifier getOCSPIdentifier()
OCSPRef
getOCSPIdentifier
in interface OCSPRef
OCSPRef.getOCSPIdentifier()
public String getLocalName()
getLocalName
in class iaik.xml.crypto.dom.DOMStructure
protected List getChildStructures()
getChildStructures
in class iaik.xml.crypto.dom.DOMStructure
protected void putChildStructure(iaik.xml.crypto.dom.DOMStructure childStructure) throws MarshalException
putChildStructure
in class iaik.xml.crypto.dom.DOMStructure
MarshalException
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 Data getDigestInputData(XMLCryptoContext context) throws XMLSignatureException
context
- the contextXMLSignatureException
- if an exception occurs getting the digest input datapublic boolean validate(XMLCryptoContext context, Data digestInput) throws XMLSignatureException
OCSPRef
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 OCSPRef
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 valueOCSPRef.validate(javax.xml.crypto.XMLCryptoContext,
javax.xml.crypto.Data)
© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC