issrg.pba.rbac
Class SimpleSignatureVerifier
java.lang.Object
issrg.pba.rbac.SimpleSignatureVerifier
- All Implemented Interfaces:
- SignatureVerifier
- Direct Known Subclasses:
- XMLSignatureVerifier
public class SimpleSignatureVerifier
- extends java.lang.Object
- implements SignatureVerifier
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 |
SimpleSignatureVerifier
protected SimpleSignatureVerifier()
SimpleSignatureVerifier
public SimpleSignatureVerifier(Verifier verifier)
- This constructor builds a SimpleSignatureVerifier given a Verifier.
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 signedsignature
- - the byte array of the digital signaturealgID
- - 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 itsigner
- - 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