Class StandardTypeFileKeyStoreLoader
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.FileKeyStoreLoader
org.apache.hadoop.hbase.io.crypto.tls.StandardTypeFileKeyStoreLoader
- All Implemented Interfaces:
KeyStoreLoader
- Direct Known Subclasses:
BCFKSFileLoader
,JKSFileLoader
,PKCS12FileLoader
Base class for instances of
KeyStoreLoader
which load the key/trust stores from files on
a filesystem using standard KeyStore
types like JKS or PKCS12.
This file has been copied from the Apache ZooKeeper project.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static enum
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.crypto.tls.FileKeyStoreLoader
FileKeyStoreLoader.Builder<T extends FileKeyStoreLoader>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char[]
protected final StandardTypeFileKeyStoreLoader.SupportedStandardKeyFormat
Fields inherited from class org.apache.hadoop.hbase.io.crypto.tls.FileKeyStoreLoader
keyStorePassword, keyStorePath, trustStorePassword, trustStorePath
-
Constructor Summary
ConstructorsConstructorDescriptionStandardTypeFileKeyStoreLoader
(String keyStorePath, String trustStorePath, char[] keyStorePassword, char[] trustStorePassword, StandardTypeFileKeyStoreLoader.SupportedStandardKeyFormat format) -
Method Summary
Modifier and TypeMethodDescriptionprivate KeyStore
Loads a KeyStore which contains at least one private key and the associated X509 cert chain.Loads a KeyStore which contains at least one X509 cert chain for a trusted Certificate Authority (CA).private static char[]
passwordStringToCharArray
(char[] password)
-
Field Details
-
EMPTY_CHAR_ARRAY
-
format
-
-
Constructor Details
-
StandardTypeFileKeyStoreLoader
StandardTypeFileKeyStoreLoader(String keyStorePath, String trustStorePath, char[] keyStorePassword, char[] trustStorePassword, StandardTypeFileKeyStoreLoader.SupportedStandardKeyFormat format)
-
-
Method Details
-
loadKeyStore
Description copied from interface:KeyStoreLoader
Loads a KeyStore which contains at least one private key and the associated X509 cert chain.- Returns:
- a new KeyStore
- Throws:
IOException
- if loading the key store fails due to an IO error, such as "file not found".GeneralSecurityException
- if loading the key store fails due to a security error, such as "unsupported crypto algorithm".
-
loadTrustStore
Description copied from interface:KeyStoreLoader
Loads a KeyStore which contains at least one X509 cert chain for a trusted Certificate Authority (CA).- Returns:
- a new KeyStore
- Throws:
IOException
- if loading the trust store fails due to an IO error, such as "file not found".GeneralSecurityException
- if loading the trust store fails due to a security error, such as "unsupported crypto algorithm".
-
keyStoreInstance
- Throws:
KeyStoreException
-
passwordStringToCharArray
-