eu.emi.security.authn.x509.helpers.trust
Class DirectoryTrustAnchorStore
java.lang.Object
eu.emi.security.authn.x509.helpers.trust.TrustAnchorStoreBase
eu.emi.security.authn.x509.helpers.trust.DirectoryTrustAnchorStore
- All Implemented Interfaces:
- TrustAnchorStore
- Direct Known Subclasses:
- OpensslTrustAnchorStore
public class DirectoryTrustAnchorStore
- extends TrustAnchorStoreBase
Retrieves CA certificates from locations given as local paths with wildcards
or URLs.
- Author:
- K. Benedyczak
Constructor Summary |
|
DirectoryTrustAnchorStore(List<String> locations,
String diskCache,
int connectionTimeout,
Timer t,
long updateInterval,
CertificateUtils.Encoding encoding,
ObserversHandler listeners)
|
protected |
DirectoryTrustAnchorStore(List<String> locations,
String diskCache,
int connectionTimeout,
Timer t,
long updateInterval,
CertificateUtils.Encoding encoding,
ObserversHandler observers,
boolean noFirstUpdate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
anchors
protected Set<TrustAnchorExt> anchors
locations2anchors
protected Map<URL,TrustAnchorExt> locations2anchors
encoding
protected CertificateUtils.Encoding encoding
DirectoryTrustAnchorStore
public DirectoryTrustAnchorStore(List<String> locations,
String diskCache,
int connectionTimeout,
Timer t,
long updateInterval,
CertificateUtils.Encoding encoding,
ObserversHandler listeners)
DirectoryTrustAnchorStore
protected DirectoryTrustAnchorStore(List<String> locations,
String diskCache,
int connectionTimeout,
Timer t,
long updateInterval,
CertificateUtils.Encoding encoding,
ObserversHandler observers,
boolean noFirstUpdate)
loadCert
protected X509Certificate loadCert(URL url)
throws IOException,
URISyntaxException,
CertificateEncodingException
- Throws:
IOException
URISyntaxException
CertificateEncodingException
reloadCerts
protected void reloadCerts(Collection<URL> locations)
- For all URLs tries to load a CA cert. Information for extensions:
this method is guaranteed to be called once per update.
update
protected void update()
- 1. work only if schedulingNeeded()
2. for all wildcards refresh file lists
3. remove the locations not valid anymore
4. for all location URLs try to get the cert
5. update timestamp
6. schedule the next update if enabled
- Specified by:
update
in class TrustAnchorStoreBase
getTrustAnchors
public Set<TrustAnchor> getTrustAnchors()
getTrustedCertificates
public X509Certificate[] getTrustedCertificates()
getLocations
public List<String> getLocations()
getConnTimeout
public int getConnTimeout()
getCacheDir
public String getCacheDir()
getEncoding
public CertificateUtils.Encoding getEncoding()
Copyright © 2012-2013 European Middleware Initiative. All Rights Reserved.