use of javax.net.ssl.X509KeyManager in project zookeeper by apache.
the class X509UtilTest method testLoadPKCS12KeyStoreNullPassword.
@ParameterizedTest
@MethodSource("data")
public void testLoadPKCS12KeyStoreNullPassword(X509KeyType caKeyType, X509KeyType certKeyType, String keyPassword, Integer paramIndex) throws Exception {
init(caKeyType, certKeyType, keyPassword, paramIndex);
if (!x509TestContext.getKeyStorePassword().isEmpty()) {
return;
}
// Make sure that empty password and null password are treated the same
X509KeyManager km = X509Util.createKeyManager(x509TestContext.getKeyStoreFile(KeyStoreFileType.PKCS12).getAbsolutePath(), null, KeyStoreFileType.PKCS12.getPropertyValue());
}
use of javax.net.ssl.X509KeyManager in project zookeeper by apache.
the class X509UtilTest method testLoadJKSKeyStoreAutodetectStoreFileType.
@ParameterizedTest
@MethodSource("data")
public void testLoadJKSKeyStoreAutodetectStoreFileType(X509KeyType caKeyType, X509KeyType certKeyType, String keyPassword, Integer paramIndex) throws Exception {
init(caKeyType, certKeyType, keyPassword, paramIndex);
// Make sure we can instantiate a key manager from the JKS file on disk
X509KeyManager km = X509Util.createKeyManager(x509TestContext.getKeyStoreFile(KeyStoreFileType.JKS).getAbsolutePath(), x509TestContext.getKeyStorePassword(), null);
}
use of javax.net.ssl.X509KeyManager in project zookeeper by apache.
the class X509UtilTest method testLoadPEMKeyStoreNullPassword.
@ParameterizedTest
@MethodSource("data")
public void testLoadPEMKeyStoreNullPassword(X509KeyType caKeyType, X509KeyType certKeyType, String keyPassword, Integer paramIndex) throws Exception {
init(caKeyType, certKeyType, keyPassword, paramIndex);
if (!x509TestContext.getKeyStorePassword().isEmpty()) {
return;
}
// Make sure that empty password and null password are treated the same
X509KeyManager km = X509Util.createKeyManager(x509TestContext.getKeyStoreFile(KeyStoreFileType.PEM).getAbsolutePath(), null, KeyStoreFileType.PEM.getPropertyValue());
}
use of javax.net.ssl.X509KeyManager in project zookeeper by apache.
the class X509UtilTest method testLoadJKSKeyStoreNullPassword.
@ParameterizedTest
@MethodSource("data")
public void testLoadJKSKeyStoreNullPassword(X509KeyType caKeyType, X509KeyType certKeyType, String keyPassword, Integer paramIndex) throws Exception {
init(caKeyType, certKeyType, keyPassword, paramIndex);
if (!x509TestContext.getKeyStorePassword().isEmpty()) {
return;
}
// Make sure that empty password and null password are treated the same
X509KeyManager km = X509Util.createKeyManager(x509TestContext.getKeyStoreFile(KeyStoreFileType.JKS).getAbsolutePath(), null, KeyStoreFileType.JKS.getPropertyValue());
}
use of javax.net.ssl.X509KeyManager in project zookeeper by apache.
the class X509UtilTest method testLoadPEMKeyStoreAutodetectStoreFileType.
@ParameterizedTest
@MethodSource("data")
public void testLoadPEMKeyStoreAutodetectStoreFileType(X509KeyType caKeyType, X509KeyType certKeyType, String keyPassword, Integer paramIndex) throws Exception {
init(caKeyType, certKeyType, keyPassword, paramIndex);
// Make sure we can instantiate a key manager from the PEM file on disk
X509KeyManager km = X509Util.createKeyManager(x509TestContext.getKeyStoreFile(KeyStoreFileType.PEM).getAbsolutePath(), x509TestContext.getKeyStorePassword(), null);
}
Aggregations