|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.test.ptb.PTBSignatureVerifier
public class PTBSignatureVerifier
This class implements the SignatureVerifier interface and provides the following mechanisms:
This class assumes that:
Field Summary | |
---|---|
protected X509Certificate |
caCertificate
|
protected java.util.Hashtable |
soaCerts
|
Constructor Summary | |
---|---|
PTBSignatureVerifier()
Constructs a PTBSignatureVerifier. |
Method Summary | |
---|---|
boolean |
addSOACertificate(java.lang.String file)
Gets a new SOA certificate and inserts it in the hash table. |
boolean |
checkSignature(byte[] value,
byte[] signature,
java.lang.String algorithmID,
TokenLocator signer)
Checks if the signature for the given value has been signed by
the signer . |
boolean |
setCACertificate(java.lang.String file)
Gets the CA certificate and validates the signature. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected X509Certificate caCertificate
protected java.util.Hashtable soaCerts
Constructor Detail |
---|
public PTBSignatureVerifier()
Method Detail |
---|
public boolean setCACertificate(java.lang.String file)
file
- is the file containing the certificate
public boolean addSOACertificate(java.lang.String file)
file
- is the file containing the certificate
public boolean checkSignature(byte[] value, byte[] signature, java.lang.String algorithmID, TokenLocator signer)
signature
for the given value
has been signed by
the signer
. This method does not perform any kind of verification related to revocations
(CRLs, OCSP queries). This method fetches the public key certificate of the signer, and follows
the certification path back to its root of trust, that is, Signer -> SOA -> CA.
checkSignature
in interface SignatureVerifier
value
- is the byte array that had been signedsignature
- is the byte array of the resulting signaturealgorithmID
- is the String representation (dotted form) of the
object identifier of the algorithm used for signingsigner
- is the Principal of the signer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |