org.globus.gsi
Class TrustedCertificates
java.lang.Object
org.globus.gsi.TrustedCertificates
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- PureTLSTrustedCertificates
- public class TrustedCertificates
- extends Object
- implements Serializable
- See Also:
- Serialized Form
certFileFilter
public static final TrustedCertificates.CertFilter certFileFilter
TrustedCertificates
protected TrustedCertificates()
TrustedCertificates
public TrustedCertificates(X509Certificate[] certs)
getCertificates
public X509Certificate[] getCertificates()
getCertificate
public X509Certificate getCertificate(String subject)
loadCertificates
public static X509Certificate[] loadCertificates(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(String locations)
getCertFilter
public static FilenameFilter getCertFilter()
refresh
public void refresh()
reload
public void reload(String locations)
isChanged
public boolean isChanged()
- Indicates if the last reload caused new certificates to be loaded or
existing certificates to be reloaded or any certificates removed
getDefaultTrustedCertificates
public static TrustedCertificates getDefaultTrustedCertificates()
- Obtains the default set of trusted certificates.
- Returns:
- TrustedCertificates object.
setDefaultTrustedCertificates
public static void setDefaultTrustedCertificates(TrustedCertificates trusted)
- Sets the default set of trusted certificates to use.
- Parameters:
trusted
- the new set of trusted certificates to use.
getDefault
public static TrustedCertificates getDefault()
- Obtains the default set of trusted certificates.
- Returns:
- TrustedCertificates object.
toString
public String toString()