Class DirectoryTrustAnchorStore
java.lang.Object
eu.emi.security.authn.x509.helpers.trust.AbstractTrustAnchorStore
eu.emi.security.authn.x509.helpers.trust.TimedTrustAnchorStoreBase
eu.emi.security.authn.x509.helpers.trust.DirectoryTrustAnchorStore
- All Implemented Interfaces:
TrustAnchorStore
- Direct Known Subclasses:
OpensslTrustAnchorStoreImpl
Retrieves CA certificates from locations given as local paths with wildcards
or URLs.
- Author:
- K. Benedyczak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Set<TrustAnchorExt>
protected CertificateUtils.Encoding
Fields inherited from class eu.emi.security.authn.x509.helpers.trust.AbstractTrustAnchorStore
observers
-
Constructor Summary
ConstructorsModifierConstructorDescriptionDirectoryTrustAnchorStore
(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) -
Method Summary
Modifier and TypeMethodDescriptionint
protected X509Certificate[]
protected void
reloadCerts
(Collection<URL> locations) For all URLs tries to load a CA cert.void
update()
1.Methods inherited from class eu.emi.security.authn.x509.helpers.trust.TimedTrustAnchorStoreBase
dispose, scheduleUpdate, setUpdateInterval
Methods inherited from class eu.emi.security.authn.x509.helpers.trust.AbstractTrustAnchorStore
checkValidity, getUpdateInterval
-
Field Details
-
anchors
-
encoding
-
-
Constructor Details
-
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)
-
-
Method Details
-
loadCerts
protected X509Certificate[] loadCerts(URL url) throws IOException, URISyntaxException, CertificateEncodingException -
reloadCerts
For all URLs tries to load a CA cert. Information for extensions: this method is guaranteed to be called once per update.- Parameters:
locations
- a collection of URLs
-
update
public 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 classTimedTrustAnchorStoreBase
-
getTrustAnchors
-
getTrustedCertificates
-
getLocations
-
getConnTimeout
public int getConnTimeout() -
getCacheDir
-
getEncoding
-