diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2022-12-19 16:04:48 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-01-09 11:14:56 +0100 |
commit | 462fd256f43cfa3ed8b3fcff0729dbf459844172 (patch) | |
tree | 6a20bbe22cc93f0464f1596615d6681bc5104ae1 /http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java | |
parent | 0796ad7fd3a85d360df2742a408545703d2c2368 (diff) |
Ensure that HTTPS clients only use allowed ciphers and protocol versions
Diffstat (limited to 'http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java')
-rw-r--r-- | http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java b/http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java new file mode 100644 index 00000000000..77d718bccb3 --- /dev/null +++ b/http-utils/src/main/java/ai/vespa/util/http/AcceptAllHostnamesVerifier.java @@ -0,0 +1,21 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package ai.vespa.util.http; + +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.SSLSession; + +/** + * @author bjorncs + */ +public class AcceptAllHostnamesVerifier implements HostnameVerifier { + + private static final AcceptAllHostnamesVerifier INSTANCE = new AcceptAllHostnamesVerifier(); + + public static AcceptAllHostnamesVerifier instance() { return INSTANCE; } + + private AcceptAllHostnamesVerifier() {} + + @Override public boolean verify(String hostname, SSLSession session) { return true; } + +} + |