org.knopflerfish.framework.permissions
Class CertificateUtil

java.lang.Object
  extended by org.knopflerfish.framework.permissions.CertificateUtil

public class CertificateUtil
extends java.lang.Object


Constructor Summary
CertificateUtil()
           
 
Method Summary
static int matchCertificates(java.security.cert.Certificate[] certs, java.lang.String pattern)
          Check if DN pattern matches any of the supplied certificate chains.
static int matchSigners(java.lang.String[] signers, java.lang.String pattern)
          Check if at least one of the signers is match by specified pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CertificateUtil

public CertificateUtil()
Method Detail

matchCertificates

public static int matchCertificates(java.security.cert.Certificate[] certs,
                                    java.lang.String pattern)
                             throws java.lang.IllegalArgumentException
Check if DN pattern matches any of the supplied certificate chains.

Returns:
Index of matching signer, otherwise -1.
Throws:
java.lang.IllegalArgumentException

matchSigners

public static int matchSigners(java.lang.String[] signers,
                               java.lang.String pattern)
Check if at least one of the signers is match by specified pattern.

Returns:
Index of matching signer, otherwise -1.