public interface SignerSignature
Signer.getSignature()| Modifier and Type | Method and Description |
|---|---|
Object |
addObject(Object object)
Adds the specified object container to the list of object containers in this signature.
|
void |
computeDigestInputs()
Computed the digest inputs for all references of this signature.
|
Object |
createObject(org.w3c.dom.DocumentFragment content)
Creates an object container with the specified DOM document fragment as its content.
|
Object |
createObject(org.w3c.dom.Element content)
Creates an object container with the specified DOM element as its content.
|
Object |
createObject(SignerManifest manifest)
Creates an object container with the specified manifest as its content.
|
Object |
createObject(SignerSignatureProperties signatureProperties)
Creates an object container with the specified signature properties container as its content.
|
Object |
createObject(java.lang.String content)
Creates an object container with the specified string as its content.
|
java.lang.String |
getId()
Gets the Id attribute value of the Signature element.
|
Object[] |
getObjects()
Gets all object containers which are part of this signature.
|
org.w3c.dom.Element |
getSignatureDOMElement()
Returns the DOM element of this XML signature structure;
i.e.
|
SignerSignedInfo |
getSignerSignedInfo()
Gets an interface to the signed information object for the signing use case.
|
Object |
removeObject(Object object)
Removes an object container from the list of object containers in this signature.
|
void |
setId(java.lang.String id)
Sets the Id attribute value of the Signature element.
|
void |
setKeyManager(SignerKeyManager keyManager)
Can be used by the application to set the key manager for the signing use case.
|
void |
sign()
Computes the signature value for this signature.
|
void setId(java.lang.String id)
null, the possibly existing Id attribute will be
removed.id - The value for the Id attribute of the Signature element.java.lang.String getId()
null if the Id attribute is not available.SignerSignedInfo getSignerSignedInfo()
void setKeyManager(SignerKeyManager keyManager) throws SignatureException
keyManager - The key manager to be used in the signing use case.SignatureException - if usage of the keyManager argument leads to an exception.Object createObject(java.lang.String content)
content - The string value for the DOM text node. Must not be null.Object createObject(org.w3c.dom.DocumentFragment content)
content - The DOM document fragment whose children will be set as the Object DOM element's
children. Must not be null.Object createObject(org.w3c.dom.Element content)
content - The DOM element which will be set as the only child of the Object DOM element. Must not
be null.Object createObject(SignerSignatureProperties signatureProperties)
signatureProperties - The signature property container which is set as the content of this object
container. Must not be null.Object createObject(SignerManifest manifest)
manifest - The manifest which is set as the content of this object container. Must not be
null.Object addObject(Object object)
object - The object container to be added to the list. Must not be null.null if the object container has already been added
to a signature.Object[] getObjects()
Object array or null if there are no object
containers available.Object removeObject(Object object)
object - The object container to be removed from the list. Must not be null.null, if the container does not exist in the
list.void computeDigestInputs()
throws SignatureException
Computed the digest inputs for all references of this signature. This method can be invoked by the application when the signature has been configured completely, if the application needs access to the digest input of a reference of this signature.
The following example shows the necessary steps after the signature has been configured completely:
SignerSignature mySignature;
...
mySignature.computeDigestInputs();
SignerSignedInfo mySignedInfo = mySignature.getSignerSignedInfo();
SignerReference[] myReferences = mySignedInfo.getSignerReferences();
for (int i = 0; i < myReferences.length; i++)
{
java.io.InputStream explicitData =
myReferences[i].getExplicitData(SignerReference.EXPLICITDATATYPE_DIGESTINPUT_);
}
...
mySignature.sign();
SignatureException - if computing the digest input for one of the signature's references
fails.void sign()
throws SignatureException
SignatureException - if no canonicalization algorithm has been specified, or if no signature
algorithm has been specified, or if computing the digest value for one
of the signature's references failed, or if computing the signature fails
for any other reason.org.w3c.dom.Element getSignatureDOMElement()
dsgi:Signature.