diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-07-03 13:39:47 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2019-07-03 15:15:56 +0200 |
commit | fac5a80821f78cee3217b71c28ea2ddd5bc38841 (patch) | |
tree | c2760f6ee5974ee4ed08f9aad21d32e3d600e042 /jrt/tests | |
parent | e79a7e85d8f79e2cbf1495a6da468b3009ea4d2c (diff) |
Make peer authentication in TlsContext configurable
Diffstat (limited to 'jrt/tests')
-rw-r--r-- | jrt/tests/com/yahoo/jrt/CryptoUtils.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jrt/tests/com/yahoo/jrt/CryptoUtils.java b/jrt/tests/com/yahoo/jrt/CryptoUtils.java index afe0412cf9e..e7e4eea568d 100644 --- a/jrt/tests/com/yahoo/jrt/CryptoUtils.java +++ b/jrt/tests/com/yahoo/jrt/CryptoUtils.java @@ -5,6 +5,7 @@ import com.yahoo.security.KeyUtils; import com.yahoo.security.X509CertificateBuilder; import com.yahoo.security.tls.AuthorizationMode; import com.yahoo.security.tls.DefaultTlsContext; +import com.yahoo.security.tls.PeerAuthentication; import com.yahoo.security.tls.TlsContext; import com.yahoo.security.tls.policy.AuthorizedPeers; import com.yahoo.security.tls.policy.HostGlobPattern; @@ -48,7 +49,7 @@ class CryptoUtils { Field.CN, new HostGlobPattern("dummy")))))); static TlsContext createTestTlsContext() { - return new DefaultTlsContext(singletonList(certificate), keyPair.getPrivate(), singletonList(certificate), authorizedPeers, AuthorizationMode.ENFORCE); + return new DefaultTlsContext(singletonList(certificate), keyPair.getPrivate(), singletonList(certificate), authorizedPeers, AuthorizationMode.ENFORCE, PeerAuthentication.NEED); } } |