Class X509TestContext.Builder
java.lang.Object
org.apache.hadoop.hbase.io.crypto.tls.X509TestContext.Builder
- Enclosing class:
- X509TestContext
Builder class, used for creating new instances of X509TestContext.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.conf.Configuration
private X509KeyType
private char[]
private File
private X509KeyType
private char[]
-
Constructor Summary
ConstructorDescriptionBuilder
(org.apache.hadoop.conf.Configuration conf) Creates an empty builder with the given Configuration. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new X509TestContext from this builder.setKeyStoreKeyType
(X509KeyType keyType) Sets the key store key type.setKeyStorePassword
(char[] password) Sets the key store password.setTempDir
(File tempDir) Sets the temporary directory.setTrustStoreKeyType
(X509KeyType keyType) Sets the trust store key type.setTrustStorePassword
(char[] password) Sets the trust store password.
-
Field Details
-
conf
-
tempDir
-
trustStoreKeyType
-
trustStorePassword
-
keyStoreKeyType
-
keyStorePassword
-
-
Constructor Details
-
Builder
Creates an empty builder with the given Configuration.
-
-
Method Details
-
build
public X509TestContext build() throws IOException, GeneralSecurityException, org.bouncycastle.operator.OperatorCreationExceptionBuilds a new X509TestContext from this builder.- Returns:
- a new X509TestContext
- Throws:
IOException
GeneralSecurityException
org.bouncycastle.operator.OperatorCreationException
-
setTempDir
Sets the temporary directory. Certificate and private key files will be created in this directory.- Parameters:
tempDir
- the temp directory.- Returns:
- this Builder.
-
setTrustStoreKeyType
Sets the trust store key type. The CA key generated for the test context will be of this type.- Parameters:
keyType
- the key type.- Returns:
- this Builder.
-
setTrustStorePassword
Sets the trust store password. Ignored for PEM trust stores, JKS trust stores will be encrypted with this password.- Parameters:
password
- the password.- Returns:
- this Builder.
-
setKeyStoreKeyType
Sets the key store key type. The private key generated for the test context will be of this type.- Parameters:
keyType
- the key type.- Returns:
- this Builder.
-
setKeyStorePassword
Sets the key store password. The private key (PEM, JKS) and certificate (JKS only) will be encrypted with this password.- Parameters:
password
- the password.- Returns:
- this Builder.
-