Skip to content

Commit

Permalink
Set path for jks
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jul 11, 2019
1 parent d408123 commit 105ade9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ abstract class RedisWriter extends DbWriter with StrictLogging with ConverterUti
val keyStoreFilepath = connection.keyStoreFilepath match {
case Some(path) =>
if (!new File(path).exists) {
throw new FileNotFoundException(s"Keystore Certificate not found in: $keyStoreFilepath")
throw new FileNotFoundException(s"Keystore Certificate not found in: $path")
}

System.setProperty("javax.net.ssl.keyStorePassword", connection.keyStorePassword.getOrElse(""))
System.setProperty("javax.net.ssl.keyStore", keyStoreFilepath)
System.setProperty("javax.net.ssl.keyStore", path)
System.setProperty("javax.net.ssl.keyStoreType", connection.keyStoreType.getOrElse("jceks"))

case None =>
Expand All @@ -53,11 +53,11 @@ abstract class RedisWriter extends DbWriter with StrictLogging with ConverterUti
connection.trustStoreFilepath match {
case Some(path) =>
if (!new File(path).exists) {
throw new FileNotFoundException(s"Truststore Certificate not found in: $trustStoreFilepath")
throw new FileNotFoundException(s"Truststore Certificate not found in: $path")
}

System.setProperty("javax.net.ssl.trustStorePassword", connection.trustStorePassword.getOrElse(""))
System.setProperty("javax.net.ssl.trustStore", trustStoreFilepath)
System.setProperty("javax.net.ssl.trustStore", path)
System.setProperty("javax.net.ssl.trustStoreType", connection.trustStoreType.getOrElse("jceks"))

case None =>
Expand Down

0 comments on commit 105ade9

Please sign in to comment.