XML Security, 1.6

com.ibm.xml.crypto.dsig.dom
Class XMLSignatureImpl

java.lang.Object
  extended by com.ibm.xml.crypto.dsig.dom.XMLStructureImpl
      extended by com.ibm.xml.crypto.dsig.dom.XMLSignatureImpl
All Implemented Interfaces:
XMLSignature, XMLStructure

 class XMLSignatureImpl
extends XMLStructureImpl
implements XMLSignature


Nested Class Summary
(package private) static class XMLSignatureImpl.SignatureValueImpl
           
 
Nested classes/interfaces inherited from interface javax.xml.crypto.dsig.XMLSignature
XMLSignature.SignatureValue
 
Field Summary
(package private)  java.util.List objects
           
 
Fields inherited from class com.ibm.xml.crypto.dsig.dom.XMLStructureImpl
afactory
 
Fields inherited from interface javax.xml.crypto.dsig.XMLSignature
XMLNS
 
Constructor Summary
XMLSignatureImpl(AlgorithmFactory f, SignedInfo si, KeyInfo ki, java.util.List objs, java.lang.String id, java.lang.String svi)
           
 
Method Summary
 java.lang.String getId()
          Returns the optional Id of this XMLSignature.
 KeyInfo getKeyInfo()
          Returns the key info of this XMLSignature.
 KeySelectorResult getKeySelectorResult()
          Returns the result of the KeySelector, if specified, after this XMLSignature has been signed or validated.
 java.util.List getObjects()
          Returns an unmodifiable list of XMLObjects contained in this XMLSignature.
 XMLSignature.SignatureValue getSignatureValue()
          Returns the signature value of this XMLSignature.
 SignedInfo getSignedInfo()
          Returns the signed info of this XMLSignature.
(package private)  void setNode(org.w3c.dom.Node n)
          Called by Marshalling/Unmarshalling.
(package private)  void setSignatureValue(byte[] sv)
           
(package private)  void setSignatureValueNode(org.w3c.dom.Node n)
          Called by Marshalling.
 void sign(XMLSignContext scontext)
          Signs this XMLSignature.
 boolean validate(XMLValidateContext vcontext)
          Validates the signature according to the core validation processing rules.
(package private)  boolean validateSignedInfo(XMLValidateContext vcontext)
           
 
Methods inherited from class com.ibm.xml.crypto.dsig.dom.XMLStructureImpl
isFeatureSupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.xml.crypto.XMLStructure
isFeatureSupported
 

Field Detail

objects

java.util.List objects
Constructor Detail

XMLSignatureImpl

XMLSignatureImpl(AlgorithmFactory f,
                 SignedInfo si,
                 KeyInfo ki,
                 java.util.List objs,
                 java.lang.String id,
                 java.lang.String svi)
Method Detail

getKeyInfo

public KeyInfo getKeyInfo()
Description copied from interface: XMLSignature
Returns the key info of this XMLSignature.

Specified by:
getKeyInfo in interface XMLSignature
Returns:
the key info (may be null if not specified)

getId

public java.lang.String getId()
Description copied from interface: XMLSignature
Returns the optional Id of this XMLSignature.

Specified by:
getId in interface XMLSignature
Returns:
the Id (may be null if not specified)

getObjects

public java.util.List getObjects()
Description copied from interface: XMLSignature
Returns an unmodifiable list of XMLObjects contained in this XMLSignature.

Specified by:
getObjects in interface XMLSignature
Returns:
an unmodifiable list of XMLObjects (may be empty but never null)

getKeySelectorResult

public KeySelectorResult getKeySelectorResult()
Description copied from interface: XMLSignature
Returns the result of the KeySelector, if specified, after this XMLSignature has been signed or validated.

Specified by:
getKeySelectorResult in interface XMLSignature
Returns:
the key selector result, or null if a key selector has not been specified or this XMLSignature has not been signed or validated

getSignatureValue

public XMLSignature.SignatureValue getSignatureValue()
Description copied from interface: XMLSignature
Returns the signature value of this XMLSignature.

Specified by:
getSignatureValue in interface XMLSignature
Returns:
the signature value

setSignatureValue

void setSignatureValue(byte[] sv)

setNode

void setNode(org.w3c.dom.Node n)
Called by Marshalling/Unmarshalling.


setSignatureValueNode

void setSignatureValueNode(org.w3c.dom.Node n)
Called by Marshalling.


getSignedInfo

public SignedInfo getSignedInfo()
Description copied from interface: XMLSignature
Returns the signed info of this XMLSignature.

Specified by:
getSignedInfo in interface XMLSignature
Returns:
the signed info (never null)

sign

public void sign(XMLSignContext scontext)
          throws MarshalException,
                 XMLSignatureException
Description copied from interface: XMLSignature
Signs this XMLSignature.

If this method throws an exception, this XMLSignature and the signContext parameter will be left in the state that it was in prior to the invocation.

Specified by:
sign in interface XMLSignature
Parameters:
scontext - the signing context
Throws:
MarshalException - if an exception occurs while marshalling
XMLSignatureException - if an unexpected exception occurs while generating the signature

validate

public boolean validate(XMLValidateContext vcontext)
                 throws XMLSignatureException
Description copied from interface: XMLSignature
Validates the signature according to the core validation processing rules. This method validates the signature using the existing state, it does not unmarshal and reinitialize the contents of the XMLSignature using the location information specified in the context.

This method only validates the signature the first time it is invoked. On subsequent invocations, it returns a cached result.

Specified by:
validate in interface XMLSignature
Parameters:
vcontext - the validating context
Returns:
true if the signature passed core validation, otherwise false
Throws:
XMLSignatureException - if an unexpected error occurs during validation that prevented the validation operation from completing

validateSignedInfo

boolean validateSignedInfo(XMLValidateContext vcontext)
                     throws XMLSignatureException
Throws:
XMLSignatureException

XML Security, 1.6

Portions Copyright 2003, 2012 IBM Corporation.
Portions Copyright 2003, 2012 Oracle and/or its affiliates.