Package xades4j.utils
Class FileSystemDirectoryCertStore
java.lang.Object
xades4j.utils.FileSystemDirectoryCertStore
Creates a
CertStore
from the contents of a file-system directory. The
directories are recusively searched for X509 certificates or CRLs files that
have one of the specified extensions. If the JCE provider is not supplied, the
CertificateFactory is obtained without specifying a provider.- Author:
- Luís
-
Constructor Summary
ModifierConstructorDescriptionFileSystemDirectoryCertStore
(String dirPath) Creates a new instance over a directory.FileSystemDirectoryCertStore
(String dirPath, String certFactoryProvider) Creates a new instance over a directory using the specified JCE provider.FileSystemDirectoryCertStore
(String dirPath, String[] certsFilesExts, String[] crlsFilesExts) Creates a new instance over a directory using the specified extensionsFileSystemDirectoryCertStore
(String dirPath, String[] certsFilesExts, String[] crlsFilesExts, String certFactoryProvider) Creates a new instance over a directory using the specified extensions and JCE provider.protected
FileSystemDirectoryCertStore
(String dirPath, String[] certsFilesExts, String[] crlsFilesExts, CertificateFactory cf) Creates a new instance over a directory using the specified extensions -
Method Summary
-
Constructor Details
-
FileSystemDirectoryCertStore
Creates a new instance over a directory. Thecer
andcrt
extesions are considered for certificates andcrl
for CRLs.- Parameters:
dirPath
- the path for the base directory- Throws:
CertificateException
- if there's an error reading the certificatesCRLException
- if there's an error reading the CRLs
-
FileSystemDirectoryCertStore
public FileSystemDirectoryCertStore(String dirPath, String[] certsFilesExts, String[] crlsFilesExts) throws CertificateException, CRLException Creates a new instance over a directory using the specified extensions- Parameters:
dirPath
- the path for the base directorycertsFilesExts
- extensions for included certificate filescrlsFilesExts
- extensions for included CRL files- Throws:
CertificateException
- if there's an error reading the certificatesCRLException
- if there's an error reading the CRLs
-
FileSystemDirectoryCertStore
public FileSystemDirectoryCertStore(String dirPath, String certFactoryProvider) throws CertificateException, CRLException, NoSuchProviderException Creates a new instance over a directory using the specified JCE provider. Thecer
andcrt
extesions are considered for certificates andcrl
for CRLs.- Parameters:
dirPath
- the path for the base directorycertFactoryProvider
- the JCE provider for the CertificateFactory used to generate certificates and CRLs- Throws:
CertificateException
- if there's an error reading the certificatesCRLException
- if there's an error reading the CRLsNoSuchProviderException
- ifcertFactoryProvider
doesn't exist
-
FileSystemDirectoryCertStore
public FileSystemDirectoryCertStore(String dirPath, String[] certsFilesExts, String[] crlsFilesExts, String certFactoryProvider) throws CertificateException, CRLException, NoSuchProviderException Creates a new instance over a directory using the specified extensions and JCE provider.- Parameters:
dirPath
- the path for the base directorycertsFilesExts
- extensions for included certificate filescrlsFilesExts
- extensions for included CRL filescertFactoryProvider
- the JCE provider for the CertificateFactory used to generate certificates and CRLs- Throws:
CertificateException
- if there's an error reading the certificatesCRLException
- if there's an error reading the CRLsNoSuchProviderException
- ifcertFactoryProvider
doesn't exist
-
FileSystemDirectoryCertStore
protected FileSystemDirectoryCertStore(String dirPath, String[] certsFilesExts, String[] crlsFilesExts, CertificateFactory cf) throws CertificateException, CRLException Creates a new instance over a directory using the specified extensions- Parameters:
dirPath
- the path for the base directorycertsFilesExts
- extensions for included certificate filescrlsFilesExts
- extensions for included CRL files- Throws:
CertificateException
- if there's an error reading the certificatesCRLException
- if there's an error reading the CRLs
-
-
Method Details
-
getStore
Gets theCertStore
resulting from this instance.- Returns:
- the
CertStore
containing all the certificates and CRLs that were found
-