Class LazyOpensslTrustAnchorStoreImpl

java.lang.Object
eu.emi.security.authn.x509.helpers.trust.AbstractTrustAnchorStore
eu.emi.security.authn.x509.helpers.trust.LazyOpensslTrustAnchorStoreImpl
All Implemented Interfaces:
OpensslTrustAnchorStore, TrustAnchorStore

public class LazyOpensslTrustAnchorStoreImpl extends AbstractTrustAnchorStore implements OpensslTrustAnchorStore
Implementation of the truststore which uses CA certificates from a single directory in OpenSSL format. Each certificate should be stored in a file named HASH.NUM, where HASH is an 8 digit hex number. The NUM must be a number, starting from 0. The hash can be either of openssl pre 1.0.0 version (with 8 least significant digits of the MD5 hash of the certificate subject in DER format) or in openssl 1.0.0 and above format (SHA1 hash of specially normalized DN). The class is configured to use one or another, never both.

This class (contrary to the OpensslTrustAnchorStoreImpl) doesn't extend DirectoryTrustAnchorStore and therefore certificates (and all corresponding files) are not loaded at startup and kept in memory. The files are loaded on-demand and are only cached in memory for no longer then the updateInterval is.

Author:
K. Benedyczak