gateway
Class CertificateVerifier

java.lang.Object
  |
  +--gateway.CertificateVerifier

public class CertificateVerifier
extends Object

Extracts and checks the validity of the Jar's certificates. A Jar can execute just if its certificates are valid.


Constructor Summary
CertificateVerifier()
           
 
Method Summary
 boolean getCert(String jar)
          Extracts the Jar certificates and compares them with the certificate imported to a keystore.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateVerifier

public CertificateVerifier()
Method Detail

getCert

public boolean getCert(String jar)
Extracts the Jar certificates and compares them with the certificate imported to a keystore. If there is a certificate in the keystore equals to the Jar's certificate it means that certificate is valid. If one of the Jar certificates is valid the Jar is ready to run.
Parameters:
jar - - the jar file name
Returns:
true if this Jar has a valid certificate, false otherwise.
Throws:
CertificateException - If there is an invalid alias associated to this Jar certificate or if there is no certificates associated to this Jar file.
InvalidAliasException - If there is no group corresponding to this alias stored in the database.
See Also:
JarRunner