Package org.ldaptive.ssl
Class X509CertificatesCredentialReader
- java.lang.Object
-
- org.ldaptive.ssl.AbstractCredentialReader<X509Certificate[]>
-
- org.ldaptive.ssl.X509CertificatesCredentialReader
-
- All Implemented Interfaces:
CredentialReader<X509Certificate[]>
public class X509CertificatesCredentialReader extends AbstractCredentialReader<X509Certificate[]>
Loads X.509 certificate credentials from a classpath, filepath, or stream resource. When working with filepath, multiple files may be separated using a comma (i.e.cert1.pem,cert2.crt
). Supported certificate formats include: PEM, DER, and PKCS7.
-
-
Field Summary
-
Fields inherited from class org.ldaptive.ssl.AbstractCredentialReader
logger
-
-
Constructor Summary
Constructors Constructor Description X509CertificatesCredentialReader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509Certificate[]
read(InputStream is, String... params)
Reads a credential object from an input stream.X509Certificate[]
read(String path, String... params)
Reads a credential object from a path.-
Methods inherited from class org.ldaptive.ssl.AbstractCredentialReader
getBufferedInputStream
-
-
-
-
Method Detail
-
read
public X509Certificate[] read(String path, String... params) throws IOException, GeneralSecurityException
Description copied from interface:CredentialReader
Reads a credential object from a path.- Specified by:
read
in interfaceCredentialReader<X509Certificate[]>
- Overrides:
read
in classAbstractCredentialReader<X509Certificate[]>
- Parameters:
path
- from which to read credential.params
- Arbitrary string parameters, e.g. password, needed to read the credential.- Returns:
- credential read from data at path.
- Throws:
IOException
- On IO errors.GeneralSecurityException
- On errors with the credential data.
-
read
public X509Certificate[] read(InputStream is, String... params) throws IOException, GeneralSecurityException
Description copied from interface:CredentialReader
Reads a credential object from an input stream.- Parameters:
is
- input stream from which to read credential.params
- Arbitrary string parameters, e.g. password, needed to read the credential.- Returns:
- credential read from data in stream.
- Throws:
IOException
- On IO errors.GeneralSecurityException
- On errors with the credential data.
-
-