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.EncodingFields 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) protectedDirectoryTrustAnchorStore(List<String> locations, String diskCache, int connectionTimeout, Timer t, long updateInterval, CertificateUtils.Encoding encoding, ObserversHandler observers, boolean noFirstUpdate) -
Method Summary
Modifier and TypeMethodDescriptionintprotected X509Certificate[]protected voidreloadCerts(Collection<URL> locations) For all URLs tries to load a CA cert.voidupdate()1.Methods inherited from class eu.emi.security.authn.x509.helpers.trust.TimedTrustAnchorStoreBase
dispose, scheduleUpdate, setUpdateIntervalMethods 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:
updatein classTimedTrustAnchorStoreBase
-
getTrustAnchors
-
getTrustedCertificates
-
getLocations
-
getConnTimeout
public int getConnTimeout() -
getCacheDir
-
getEncoding
-