issrg.pba.rbac
Class SimpleSignatureVerifier

java.lang.Object
  extended byissrg.pba.rbac.SimpleSignatureVerifier
All Implemented Interfaces:
SignatureVerifier

public class SimpleSignatureVerifier
extends java.lang.Object
implements SignatureVerifier

This class takes an issrg.security.Verifier object and lets do simple signature verification. Generally, it gets the signer's Public Key Certificates and applies them in turn. If any of them succeeds, the signature verification succeeds.

Version:
1.0
Author:
A Otenko

Constructor Summary
protected SimpleSignatureVerifier()
           
  SimpleSignatureVerifier(Verifier verifier)
          This constructor builds a SimpleSignatureVerifier given a Verifier.
 
Method Summary
 boolean checkSignature(byte[] data, byte[] signature, java.lang.String algID, TokenLocator signer)
          This method checks if there is any Public Key Certificate that can verify the digital signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSignatureVerifier

protected SimpleSignatureVerifier()

SimpleSignatureVerifier

public SimpleSignatureVerifier(Verifier verifier)
This constructor builds a SimpleSignatureVerifier given a Verifier.

Method Detail

checkSignature

public boolean checkSignature(byte[] data,
                              byte[] signature,
                              java.lang.String algID,
                              TokenLocator signer)
                       throws PkiException
This method checks if there is any Public Key Certificate that can verify the digital signature.

Specified by:
checkSignature in interface SignatureVerifier
Parameters:
data - - the byte array that has been signed
signature - - the byte array of the digital signature
algID - - the signature algorithm identifier; normally it is a standard algorithm identifier (e.g. an OID), but can be an implementation-specific identifier, if the Verifier can understand it
signer - - the TokenLocator pointing to the signer's entry with Public Key Certificates
Returns:
true, if there is a valid non-revoked PKI token, which proves the signature is valid; false otherwise
Throws:
PkiException - if any unrecoverable error occurs