public abstract class XAdESTimeStampImpl extends XadesDOMStructure implements XAdESTimeStamp
Modifier and Type | Field and Description |
---|---|
protected iaik.xml.filter.impl.CachedInputStream |
cachedTimeStampInput_
The cached time-stamp input.
|
protected iaik.xml.crypto.dsig.CanonicalizationMethodImpl |
canonicalizationMethod_
The canonicalization method.
|
protected EncapsulatedTimeStampImpl |
encTS_
The encapsulated time-stamp.
|
protected String |
id_
The
id -attribute value. |
protected List |
includes_
The list of
Include s. |
protected static int |
INVALID
Validation status invalid.
|
protected String |
tokenId_
The
id -attribute value of the time-stamp token. |
protected static int |
UNKNOWN
Validation status unknown.
|
protected static int |
VALID
Validation status valid.
|
protected int |
validationStatus_
The validation status.
|
Modifier | Constructor and Description |
---|---|
protected |
XAdESTimeStampImpl(List includes,
iaik.xml.crypto.dsig.CanonicalizationMethodImpl cm,
String id,
String tokenId)
Creates a new instance of this
XAdESTimeStampImpl with the
given list of Include s, canonicalization method and id
-attribute values. |
protected |
XAdESTimeStampImpl(Node node)
Creates a new instance of this
XAdESTimeStampImpl with the
given node. |
Modifier and Type | Method and Description |
---|---|
protected InputStream |
canonicalizeTargetSignatureValueElement(DOMCryptoContext context) |
CanonicalizationMethod |
getCanonicalizationMethod()
Returns the canonicalization method.
|
protected List |
getChildStructures() |
String |
getId()
Returns the
id -attribute value |
List |
getIncludes()
Returns the list
Includes |
protected XAdESSignatureImpl |
getTargetSignature(DOMCryptoContext context) |
InputStream |
getTimeStampInputStream()
Returns the time-stamp input stream, if time-stamp caching is enabled.
|
TimeStampToken |
getTimeStampToken()
Returns the time stamp token.
|
String |
getTokenId()
Returns the
id -attribute value of the timestamp token. |
protected Attr |
marshalIDAttribute(DOMCryptoContext context,
Element parent) |
void |
produceAndAppendTimeStamp(DOMCryptoContext context)
Produce and append a time-stamp token.
|
TimeStampToken |
produceTimeStamp(OctetStreamData data,
DOMCryptoContext context)
Produce the time-stamp token.
|
protected void |
putChildStructure(iaik.xml.crypto.dom.DOMStructure childStructure) |
protected void |
unmarshalAttributes(NamedNodeMap attributes,
DOMCryptoContext context) |
boolean |
validate(XMLCryptoContext context)
Validates this time-stamp.
|
getInstance, getNamespace, getParentQualifyingPropertiesOf, getParentSignatureOf
addBytesToElement, addBytesToElement, clearMarshalling, clearMarshalling, getBytesFromElement, getBytesFromElementStream, getChildStructureVersion, getHere, getImplClass, getInstance, getInstance, getLocalName, getNode, getParentStructure, getParentStructureOf, getQualifiedName, getQualifiedName, hasNSDeclAttrInScope, isFeatureSupported, isNSDeclInScope, marshal, marshalAttributes, marshalElement, newIDforLookUp, putImplClass, setBackToCompatibilityPrior1_14, setNode, setParentStructure, toString, unmarshal, unmarshalElement, unmarshalIDAttribute, unmarshalStructures, wrapNode
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isFeatureSupported
protected static final int UNKNOWN
protected static final int INVALID
protected static final int VALID
protected iaik.xml.crypto.dsig.CanonicalizationMethodImpl canonicalizationMethod_
protected EncapsulatedTimeStampImpl encTS_
protected String id_
id
-attribute value.protected int validationStatus_
protected String tokenId_
id
-attribute value of the time-stamp token.protected iaik.xml.filter.impl.CachedInputStream cachedTimeStampInput_
protected XAdESTimeStampImpl(Node node)
XAdESTimeStampImpl
with the
given node.node
- the node to unmarshal fromprotected XAdESTimeStampImpl(List includes, iaik.xml.crypto.dsig.CanonicalizationMethodImpl cm, String id, String tokenId)
XAdESTimeStampImpl
with the
given list of Include
s, canonicalization method and id
-attribute values.includes
- a list of Include
scm
- the canonicalization methodid
- the id
-attribute valuetokenId
- the id
-attribute value of the time-stamp tokenNullPointerException
- if includes
is null
IllegalArgumentException
- if includes
is emptyClassCastException
- if includes
contains any elements not of type
Include
public CanonicalizationMethod getCanonicalizationMethod() throws NoSuchAlgorithmException
XAdESTimeStamp
getCanonicalizationMethod
in interface XAdESTimeStamp
CanonicalizationMethod
NoSuchAlgorithmException
XAdESTimeStamp.getCanonicalizationMethod()
public List getIncludes()
XAdESTimeStamp
Includes
getIncludes
in interface XAdESTimeStamp
Include
sXAdESTimeStamp.getIncludes()
public TimeStampToken getTimeStampToken()
XAdESTimeStamp
getTimeStampToken
in interface XAdESTimeStamp
XAdESTimeStamp.getTimeStampToken()
public String getId()
XAdESTimeStamp
id
-attribute valuegetId
in interface XAdESTimeStamp
public String getTokenId()
XAdESTimeStamp
id
-attribute value of the timestamp token.getTokenId
in interface XAdESTimeStamp
id
-attribute value of the timestamp token.XAdESTimeStamp.getTokenId()
public InputStream getTimeStampInputStream()
XAdESTimeStamp
getTimeStampInputStream
in interface XAdESTimeStamp
null
if time-stamp caching is not enabled or this
time-stamp has not been digested or validated.XAdESTimeStamp.getTimeStampInputStream()
protected Attr marshalIDAttribute(DOMCryptoContext context, Element parent)
marshalIDAttribute
in class iaik.xml.crypto.dom.DOMStructure
DOMStructure.marshalIDAttribute(DOMCryptoContext,
Element)
protected void unmarshalAttributes(NamedNodeMap attributes, DOMCryptoContext context) throws MarshalException
unmarshalAttributes
in class iaik.xml.crypto.dom.DOMStructure
MarshalException
DOMStructure.unmarshalAttributes(org.w3c.dom.NamedNodeMap,
DOMCryptoContext)
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 TimeStampToken produceTimeStamp(OctetStreamData data, DOMCryptoContext context) throws TimeStampException, MarshalException
data
- the data that is being time-stapedcontext
- the context for the time-stamping processMarshalException
- if no time-stamp processor is provided in the context, or the
time-stamping fails for any reasonTimeStampException
public void produceAndAppendTimeStamp(DOMCryptoContext context) throws XMLSignatureException, MarshalException
context
- the contextXMLSignatureException
- if an unexpected exception occurs during time-stampingMarshalException
- if an exception occurs during marshalingpublic boolean validate(XMLCryptoContext context) throws XMLSignatureException
This method only validates the time-stamp the first time it is invoked. On subsequent invocations, it returns a cached result.
validate
in interface XAdESTimeStamp
context
- the validating contexttrue
if this time-stamp was validated successfully;
false
otherwiseNullPointerException
- if context
is null
XMLSignatureException
- if an unexpected exception occurs while validating the time-stampprotected XAdESSignatureImpl getTargetSignature(DOMCryptoContext context) throws XMLSignatureException
XMLSignatureException
protected InputStream canonicalizeTargetSignatureValueElement(DOMCryptoContext context) throws XMLSignatureException
XMLSignatureException
© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC