diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-28 22:34:34 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-28 22:34:34 +0000 |
commit | 326d5340e6d7077a3eea7847434410a503deb98f (patch) | |
tree | 21d236fc4cdcf2de6a8f3ca104efa3d1df4774fb /jrt/src/com | |
parent | 02080c165ee28713caf5e74773093aaa19d39b3e (diff) |
Use singleton already present.
Diffstat (limited to 'jrt/src/com')
-rw-r--r-- | jrt/src/com/yahoo/jrt/CryptoEngine.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/jrt/src/com/yahoo/jrt/CryptoEngine.java b/jrt/src/com/yahoo/jrt/CryptoEngine.java index 6d1955d7f66..318ee333fee 100644 --- a/jrt/src/com/yahoo/jrt/CryptoEngine.java +++ b/jrt/src/com/yahoo/jrt/CryptoEngine.java @@ -1,10 +1,7 @@ // Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jrt; - -import com.yahoo.security.tls.AuthorizationMode; import com.yahoo.security.tls.MixedMode; -import com.yahoo.security.tls.ConfigFileBasedTlsContext; import com.yahoo.security.tls.TlsContext; import com.yahoo.security.tls.TransportSecurityUtils; @@ -24,8 +21,7 @@ public interface CryptoEngine extends AutoCloseable { if (!TransportSecurityUtils.isTransportSecurityEnabled()) { return new NullCryptoEngine(); } - AuthorizationMode mode = TransportSecurityUtils.getInsecureAuthorizationMode(); - TlsContext tlsContext = new ConfigFileBasedTlsContext(TransportSecurityUtils.getConfigFile().get(), mode); + TlsContext tlsContext = TransportSecurityUtils.getSystemTlsContext().get(); TlsCryptoEngine tlsCryptoEngine = new TlsCryptoEngine(tlsContext); MixedMode mixedMode = TransportSecurityUtils.getInsecureMixedMode(); switch (mixedMode) { |