2 * Copyright (c) 2010-2021 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.unifi.internal.ssl;
15 import java.net.Socket;
16 import java.security.cert.CertificateException;
17 import java.security.cert.X509Certificate;
19 import javax.net.ssl.SSLEngine;
20 import javax.net.ssl.X509ExtendedTrustManager;
24 * The {@link UniFiTrustManager} is a "trust all" implementation of {@link X509ExtendedTrustManager}.
26 * @see {@link UniFiTrustManagerProvider}
28 * @author Matthew Bowman - Initial contribution
30 public class UniFiTrustManager extends X509ExtendedTrustManager {
32 private static UniFiTrustManager instance = new UniFiTrustManager();
34 public static UniFiTrustManager getInstance() {
39 * private construction - singleton
41 private UniFiTrustManager() {
45 public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {
49 public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {
53 public X509Certificate[] getAcceptedIssuers() {
58 public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket)
59 throws CertificateException {
63 public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
64 throws CertificateException {
68 public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket)
69 throws CertificateException {
73 public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine)
74 throws CertificateException {