issrg.pba.rbac
Class SimpleSignatureVerifier

java.lang.Object
  extended by issrg.pba.rbac.SimpleSignatureVerifier
All Implemented Interfaces:
SignatureVerifier
Direct Known Subclasses:
XMLSignatureVerifier

public class SimpleSignatureVerifier
extends java.lang.Object
implements SignatureVerifier


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.
 Verifier getVerifier()
          get the verifier so that any authz token parsers can view it for retrieving PKC repositories and root CAs, which are configured in PERMIS initialise time.
 
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

getVerifier

public Verifier getVerifier()
get the verifier so that any authz token parsers can view it for retrieving PKC repositories and root CAs, which are configured in PERMIS initialise time.


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