org.xnap.plugin
Class PluginVerifier

java.lang.Object
  extended by org.xnap.plugin.PluginVerifier

public class PluginVerifier
extends java.lang.Object

This class verifies the signature of the given Jar and provides informations about its signers

Version:
$Id: PluginVerifier.java,v 1.7 2003/11/04 13:51:06 vanto Exp $

Constructor Summary
PluginVerifier(PluginInfo info)
          Initialized a new PluginVerifier It verfies all jars used by the plugin and provides information about its signers.
 
Method Summary
 java.security.cert.Certificate[] getCertificates()
          Returns the list of certificates (mostly X509)
 java.lang.String[] getSignedJars()
          Returns a list of signed jars
 java.lang.String getSigners()
          Returns a String with all signers.
 java.lang.String[] getUnsignedJars()
          Returns a list of unsigned jars
 boolean isSigned()
          Return true, (only) if all jars of the plugin are signed.
 boolean isTrustedBy(java.lang.String[] encodedPKs)
          Returns true, if all jars are signed and trusted by the given keyset
 boolean isTrustedByXNap()
          Returns true, if all jars are signed and trusted by XNap
 boolean isValid()
          Returns true if all jars are consistent and if signed, the signature must be valid.
static java.lang.String readablePrincipal(java.security.Principal prin)
          Formats the Principal to make it more human readable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginVerifier

public PluginVerifier(PluginInfo info)
               throws java.io.IOException
Initialized a new PluginVerifier It verfies all jars used by the plugin and provides information about its signers.

Throws:
java.io.IOException
Method Detail

isValid

public boolean isValid()
Returns true if all jars are consistent and if signed, the signature must be valid.


isSigned

public boolean isSigned()
Return true, (only) if all jars of the plugin are signed.


isTrustedByXNap

public boolean isTrustedByXNap()
Returns true, if all jars are signed and trusted by XNap


isTrustedBy

public boolean isTrustedBy(java.lang.String[] encodedPKs)
Returns true, if all jars are signed and trusted by the given keyset

Parameters:
encodedPKs - StringArray of Base64-encoded X509-PublicKeys

getUnsignedJars

public java.lang.String[] getUnsignedJars()
Returns a list of unsigned jars


getSignedJars

public java.lang.String[] getSignedJars()
Returns a list of signed jars


getCertificates

public java.security.cert.Certificate[] getCertificates()
Returns the list of certificates (mostly X509)


readablePrincipal

public static java.lang.String readablePrincipal(java.security.Principal prin)
Formats the Principal to make it more human readable


getSigners

public java.lang.String getSigners()
Returns a String with all signers.



Copyright © 2001-2005 XNap Team. All Rights Reserved.