Change keystore type to JKS

Change-Id: I8cdb7a22d9bec61906b6a9acd409079cd6dd2dcf
This commit is contained in:
Piotr Fus 2018-01-30 11:09:21 +01:00
parent 0b7d0b52bc
commit 4d4d303d58
2 changed files with 4 additions and 6 deletions

View file

@ -54,7 +54,7 @@ class HttpServerWrapper {
}
private KeyManager[] buildKeyManager(Https https) {
KeyStore keyStore = KeyStore.getInstance(KeyStore.defaultType)
KeyStore keyStore = KeyStore.getInstance('jks')
keyStore.load(new FileInputStream(https.keystorePath), https.keystorePassword.toCharArray())
KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.defaultAlgorithm)
kmf.init(keyStore, https.keyPassword.toCharArray())
@ -63,7 +63,7 @@ class HttpServerWrapper {
private TrustManager[] buildTrustManager(Https https) {
if (https.requireClientAuth) {
KeyStore trustStore = KeyStore.getInstance(KeyStore.defaultType)
KeyStore trustStore = KeyStore.getInstance('jks')
trustStore.load(new FileInputStream(https.truststorePath), https.truststorePassword.toCharArray())
TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.defaultAlgorithm)
tmf.init(trustStore)