diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2018-09-05 18:10:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-05 18:10:01 +0200 |
commit | be4c7dafa47211904cda7e565161566815cd89a8 (patch) | |
tree | c39a318979e32dac35dcb05f0ba64aea684a1d96 /controller-server | |
parent | 9394b251a6353151e01121d019052a2e0860f117 (diff) | |
parent | c6820ac582e67a40f8411e26bc4c9c1c0b7e8099 (diff) |
Merge pull request #6807 from vespa-engine/bjorncs/deprecate-old-crypto-classes
Bjorncs/deprecate old crypto classes
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzTrustStoreConfigurator.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzTrustStoreConfigurator.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzTrustStoreConfigurator.java index 909104d1731..e805332429b 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzTrustStoreConfigurator.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzTrustStoreConfigurator.java @@ -4,17 +4,13 @@ package com.yahoo.vespa.hosted.controller.athenz.filter; import com.google.inject.Inject; import com.yahoo.jdisc.http.ssl.SslTrustStoreConfigurator; import com.yahoo.jdisc.http.ssl.SslTrustStoreContext; -import com.yahoo.vespa.athenz.tls.KeyStoreBuilder; -import com.yahoo.vespa.athenz.tls.KeyStoreType; +import com.yahoo.security.KeyStoreBuilder; +import com.yahoo.security.KeyStoreType; import com.yahoo.vespa.hosted.controller.athenz.config.AthenzConfig; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; +import java.nio.file.Path; +import java.nio.file.Paths; import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateException; /** * Load trust store with Athenz CA certificates @@ -27,10 +23,10 @@ public class AthenzTrustStoreConfigurator implements SslTrustStoreConfigurator { @Inject public AthenzTrustStoreConfigurator(AthenzConfig config) { - this.trustStore = createTrustStore(new File(config.athenzCaTrustStore())); + this.trustStore = createTrustStore(Paths.get(config.athenzCaTrustStore())); } - private static KeyStore createTrustStore(File trustStoreFile) { + private static KeyStore createTrustStore(Path trustStoreFile) { return KeyStoreBuilder.withType(KeyStoreType.JKS) .fromFile(trustStoreFile, "changeit".toCharArray()) .build(); |