TrustedCertificates (Java Globus API)

org.globus.security
Class TrustedCertificates

java.lang.Object
  |
  +--org.globus.security.TrustedCertificates

public class TrustedCertificates
extends java.lang.Object


Nested Class Summary
static class TrustedCertificates.CertFilter
           
 
Field Summary
static TrustedCertificates.CertFilter certFileFilter
           
 
Constructor Summary
TrustedCertificates(java.security.cert.X509Certificate[] certs)
           
 
Method Summary
static java.io.FilenameFilter getCertFilter()
           
 java.security.cert.X509Certificate getCertificate(java.lang.String subject)
           
 java.security.cert.X509Certificate[] getCertificates()
           
static TrustedCertificates getDefaultTrustedCertificates()
          Obtains the default set of trusted certificates.
static TrustedCertificates load(java.lang.String locations)
           
static java.security.cert.X509Certificate[] loadCertificates(java.lang.String locations)
          Loads X509 certificates from specified locations.
static void setDefaultTrustedCertificates(TrustedCertificates trusted)
          Sets the default set of trusted certificates to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

certFileFilter

public static final TrustedCertificates.CertFilter certFileFilter
Constructor Detail

TrustedCertificates

public TrustedCertificates(java.security.cert.X509Certificate[] certs)
Method Detail

getCertificates

public java.security.cert.X509Certificate[] getCertificates()

getCertificate

public java.security.cert.X509Certificate getCertificate(java.lang.String subject)

loadCertificates

public static java.security.cert.X509Certificate[] loadCertificates(java.lang.String locations)
Loads X509 certificates from specified locations. The locations can be either files or directories. The directories will be automatically traversed and all files in the form of hashcode.number will be loaded automatically.

Parameters:
locations - a list of certificate files/directories to load the certificates from. The locations are comma separated.
Returns:
java.security.cert.X509Certificate an array of loaded certificates

load

public static TrustedCertificates load(java.lang.String locations)

getCertFilter

public static java.io.FilenameFilter getCertFilter()

getDefaultTrustedCertificates

public static TrustedCertificates getDefaultTrustedCertificates()
Obtains the default set of trusted certificates. In general, a set of trusted certificates is loaded once and cached. All subsequent calls return the cached copy of trusted certificates. The certificates can be forced to reload by calling setDefaultTrustedCertificates() and passing null as the new proxy.

Returns:
TrustedCertificates object.

setDefaultTrustedCertificates

public static void setDefaultTrustedCertificates(TrustedCertificates trusted)
Sets the default set of trusted certificates to use. If set to null, the certificates will be reloaded next time the getDefaultTrustedCertificates() method is invoked.

Parameters:
trusted - the new set of trusted certificates to use. Can be null to force the reload of the certificates.