diff options
author | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-11-23 14:46:37 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@vespa.ai> | 2023-11-23 14:47:29 +0100 |
commit | 5565708e94a13aab1875ec4c341ea2c930b9ee3c (patch) | |
tree | e52a0ac789db63aff70b7bf5eba42ee97cc9bdd5 /jrt | |
parent | a7e6903c3b894de22a400956dbfbf2f70983f88e (diff) |
Change 'TlsContext' interface to return `X509SslContext'
Diffstat (limited to 'jrt')
-rw-r--r-- | jrt/tests/com/yahoo/jrt/CryptoUtils.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jrt/tests/com/yahoo/jrt/CryptoUtils.java b/jrt/tests/com/yahoo/jrt/CryptoUtils.java index 223ed6ca2ba..7bad0e64aa8 100644 --- a/jrt/tests/com/yahoo/jrt/CryptoUtils.java +++ b/jrt/tests/com/yahoo/jrt/CryptoUtils.java @@ -17,6 +17,7 @@ import javax.security.auth.x500.X500Principal; import java.security.KeyPair; import java.security.cert.X509Certificate; import java.time.Instant; +import java.util.List; import static com.yahoo.security.KeyAlgorithm.EC; import static com.yahoo.security.SignatureAlgorithm.SHA256_WITH_ECDSA; @@ -45,8 +46,8 @@ class CryptoUtils { RequiredPeerCredential.of(Field.CN, "localhost"))))); static TlsContext createTestTlsContext() { - return new DefaultTlsContext( - singletonList(certificate), keyPair.getPrivate(), singletonList(certificate), authorizedPeers, + return DefaultTlsContext.of( + List.of(certificate), keyPair.getPrivate(), List.of(certificate), authorizedPeers, AuthorizationMode.ENFORCE, PeerAuthentication.NEED, HostnameVerification.ENABLED); } |