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
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.