Class PEMFileLoader
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.FileKeyStoreLoader
org.apache.hadoop.hbase.io.crypto.tls.PEMFileLoader
- All Implemented Interfaces:
KeyStoreLoader
Implementation of
FileKeyStoreLoader
that loads from PEM files.
This file has been copied from the Apache ZooKeeper project.- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.apache.hadoop.hbase.io.crypto.tls.FileKeyStoreLoader
keyStorePassword, keyStorePath, trustStorePassword, trustStorePath
-
Constructor Summary
ModifierConstructorDescriptionprivate
PEMFileLoader
(String keyStorePath, String trustStorePath, char[] keyStorePassword, char[] trustStorePassword) -
Method Summary
Modifier and TypeMethodDescriptionLoads 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).
-
Constructor Details
-
PEMFileLoader
private PEMFileLoader(String keyStorePath, String trustStorePath, char[] keyStorePassword, char[] trustStorePassword)
-
-
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".
-