public class DOMExtensionContext extends iaik.xml.crypto.dom.DOMCryptoContext implements XMLExtendContext
XMLExtendContext
. As an existing
DOM representation of a signature can be subsequently modified after
marsahlling, this class does not contain any additional methods to specify
the location of the marshalled elements.
Note that DOMExtensionContext
instances can contain information
specific to the XML Signature structure it is used with. The result is
unpredictable if a DOMExtensionContext
is used with different
signature structures (for example, you should not use the same
DOMExtensionContext
instance to extend two different
XAdESSignature
objects).
Modifier and Type | Field and Description |
---|---|
static String |
XADES_VERSION |
BASE64_LINEBREAK, CACHE_CANON_INPUT_DATA, CACHE_REFERENCE, DEBUG_OS, EXPAND_ENTITY_REFERENCES, FIX_SUBTREE_NODESET, HMAC_MINIMUM_HALF_LENGTH, HMAC_MINIMUM_OUTPUT_LENGTH, HMAC_MINIMUM_OUTPUT_THROW_EX_ON_VERIFY, HMAC_OUTPUT_LENGTH_ALLOW_FLOORED_MOD8, HMAC_OUTPUT_LENGTH_MOD8, IGNORING_ELEMENT_CONTENT_WHITESPACE, KEYINFO_TRIM_NAMES, MAX_NUM_OF_TRANSFORMS, NODESETDATA_2_OCTETSTREAMDATA, SIGN_OVER, SYSTEM_PROPERTY_DEBUG_OS, SYSTEM_PROPERTY_FIX_SUBTREE_NODESET, XERCES_SECURITY_MANAGER, XPATH_EVALUATOR
Constructor and Description |
---|
DOMExtensionContext()
Deprecated.
|
DOMExtensionContext(DOMCryptoContext parentContext)
Creates a new
DOMExtensionContext that delegates namespace prefix
handling and the handling of id-Attributes to the underlying parent
context. |
public static final String XADES_VERSION
public DOMExtensionContext()
DOMExtensionContext(javax.xml.crypto.dom.DOMCryptoContext)
as the
extension of a XMLSignature
involves prior
signing XMLSignature.sign(XMLSignContext)
or
verification (validation)
XMLSignature.validate(XMLValidateContext)
and
the involved XMLSignContext
and
XMLValidateContext
should be considered.public DOMExtensionContext(DOMCryptoContext parentContext)
DOMExtensionContext
that delegates namespace prefix
handling and the handling of id-Attributes to the underlying parent
context.parentContext
- the underlying context.protected void setDefaultProperties()
setDefaultProperties
in class iaik.xml.crypto.dom.DOMCryptoContext
public CounterSignatureImpl.DOMCounterSignContext createCounterSignContext(KeySelector csKeySelector, Node parent)
DOMExtensionContext
with the specified parent
context and signing key. This constructor should be only used for adding a
CounterSignature. The signing key is stored in a
singleton
KeySelector
that is returned by the
getKeySelector
method. The
marshalled XMLSignature
will be added as the last child
element of the specified parent node unless a next sibling node is
specified by invoking the nextSibling
method.csKeySelector
- the signing key used for signing the CounterSignatureNullPointerException
- if signingKey
or parent
is
null
public String getBaseURI()
getBaseURI
in interface XMLCryptoContext
getBaseURI
in class DOMCryptoContext
public String getDefaultNamespacePrefix()
getDefaultNamespacePrefix
in interface XMLCryptoContext
getDefaultNamespacePrefix
in class DOMCryptoContext
public KeySelector getKeySelector()
getKeySelector
in interface XMLCryptoContext
getKeySelector
in class DOMCryptoContext
public String getNamespacePrefix(String namespaceURI, String defaultPrefix)
getNamespacePrefix
in interface XMLCryptoContext
getNamespacePrefix
in class DOMCryptoContext
public Object getProperty(String name)
getProperty
in interface XMLCryptoContext
getProperty
in class DOMCryptoContext
public URIDereferencer getURIDereferencer()
getURIDereferencer
in interface XMLCryptoContext
getURIDereferencer
in class DOMCryptoContext
public Iterator iterator()
iterator
in class DOMCryptoContext
public Object put(Object key, Object value)
put
in interface XMLCryptoContext
put
in class iaik.xml.crypto.dom.DOMCryptoContext
public Object get(Object key)
get
in interface XMLCryptoContext
get
in class iaik.xml.crypto.dom.DOMCryptoContext
DOMCryptoContext.get(java.lang.Object)
public Element getElementById(String idValue)
getElementById
in class iaik.xml.crypto.dom.DOMCryptoContext
public String putNamespacePrefix(String namespaceURI, String prefix)
putNamespacePrefix
in interface XMLCryptoContext
putNamespacePrefix
in class DOMCryptoContext
public void setBaseURI(String baseURI)
setBaseURI
in interface XMLCryptoContext
setBaseURI
in class DOMCryptoContext
public void setDefaultNamespacePrefix(String defaultPrefix)
setDefaultNamespacePrefix
in interface XMLCryptoContext
setDefaultNamespacePrefix
in class DOMCryptoContext
public void setIdAttributeNS(Element element, String namespaceURI, String localName)
setIdAttributeNS
in class DOMCryptoContext
public void setKeySelector(KeySelector ks)
setKeySelector
in interface XMLCryptoContext
setKeySelector
in class DOMCryptoContext
public Object setProperty(String name, Object value)
setProperty
in interface XMLCryptoContext
setProperty
in class iaik.xml.crypto.dom.DOMCryptoContext
public void setURIDereferencer(URIDereferencer dereferencer)
setURIDereferencer
in interface XMLCryptoContext
setURIDereferencer
in class DOMCryptoContext
© 2002-2005 IAIK, © 2004, 2006 - 2017 Stiftung SIC