public interface VerifierSignature
Verifier.getSignature()| Modifier and Type | Method and Description |
|---|---|
void |
computeDigestInputs()
Computed the digest inputs for all references of this signature.
|
java.lang.String |
getId()
Gets the Id attribute value of the Signature element.
|
VerifierKeyManager |
getKeyManager()
Gets the key manager employed by IXSIL in the verification use case.
|
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.
|
VerifierSignedInfo |
getVerifierSignedInfo()
Gets an interface to the signed information object for the verification use case.
|
void |
setKeyManager(VerifierKeyManager keyManager)
Can be used by the application to set the key manager for the verification use case.
|
void |
verify()
Verifies this signature in a two step fashion: At first, for each reference in the signed information
the digest will be produced over the referred data entity and compared against the digest value stored
in the reference.
|
java.lang.String getId()
null if the Id attribute is not available.VerifierSignedInfo getVerifierSignedInfo()
Object[] getObjects()
Object array or null if there are no object
containers available.void setKeyManager(VerifierKeyManager keyManager)
keyManager - The key manager to be used in the verification use case.VerifierKeyManager getKeyManager() throws SignatureException
null.VerifierKeyManager, or null if no key manager is currently
employed.SignatureException - if instantiating the default key manager fails. This can happen if the
application has not explicitly set a key manager, and IXSIL tries to
set up the default key manager.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:
VerifierSignature mySignature;
...
mySignature.computeDigestInputs();
VerifierSignedInfo mySignedInfo = mySignature.getVerifierSignedInfo();
VerifierReference[] myReferences = mySignedInfo.getVerifierReferences();
for (int i = 0; i < myReferences.length; i++)
{
java.io.InputStream explicitData =
myReferences[i].getExplicitData(SignerReference.EXPLICITDATATYPE_DIGESTINPUT_);
}
...
mySignature.verify();
SignatureException - if computing the digest input for one of the signature's references
fails.void verify()
throws SignatureException
SignatureException - if digest verification fails for one of the signature's references, or
if neither the verifcation key has been specified nor a KeyInfo element
is present in the signature, or if verifying the signature fails, or if
the signature cannot be verified for any other reason.org.w3c.dom.Element getSignatureDOMElement()
dsgi:Signature.