issrg.test.util
Class SamplePKI

java.lang.Object
  extended by issrg.test.util.SamplePKI
All Implemented Interfaces:
SignatureVerifier

public class SamplePKI
extends java.lang.Object
implements SignatureVerifier

This PKI is a sample code. It does not do any real signature verification. It simply returns true.


Constructor Summary
SamplePKI()
           
 
Method Summary
 boolean checkSignature(byte[] Value, byte[] Signature, java.lang.String algorithmID, TokenLocator Signer)
          This method checks if the Signature for the given Value has been created by the Signer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamplePKI

public SamplePKI()
Method Detail

checkSignature

public boolean checkSignature(byte[] Value,
                              byte[] Signature,
                              java.lang.String algorithmID,
                              TokenLocator Signer)
Description copied from interface: SignatureVerifier
This method checks if the Signature for the given Value has been created by the Signer. It is the responsibility of this object to fetch any relevant CRLs, or call an OCSP server or any other method to ensure that the public key of the Signer has not been revoked. It is also the responsibility of this object to fetch the public key certificate of the signer, and to follow the certification path back to its root of trust. If the signer is not certified directly or indirectly beneath the root or roots of trust that the PKI knows about, then it must fail to verify the signature.

Specified by:
checkSignature in interface SignatureVerifier
Parameters:
Value - is the byte array that had been signed
Signature - is the byte array of the resulting signature
algorithmID - is the String representation (dotted form) of the object identifier of the algorithm used for signing
Signer - is the TokenLocator of the signer
Returns:
true, if there is a valid non-revoked PKI token, which proves the signature is valid; false otherwise