]> git.basschouten.com Git - openhab-addons.git/blob
ab2bff4e151623bb84a659b21e45f227a28277f5
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.samsungtv.internal;
14
15 import javax.net.ssl.X509ExtendedTrustManager;
16
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.openhab.core.io.net.http.TlsTrustManagerProvider;
19 import org.openhab.core.io.net.http.TrustAllTrustManager;
20 import org.osgi.service.component.annotations.Component;
21
22 /**
23  * Provides a TrustManager to allow secure websocket connections to any TV (=server)
24  *
25  * @author Arjan Mels - Initial Contribution
26  */
27 @Component
28 @NonNullByDefault
29 public class SamsungTvTlsTrustManagerProvider implements TlsTrustManagerProvider {
30
31     @Override
32     public String getHostName() {
33         return "SmartViewSDK";
34     }
35
36     @Override
37     public X509ExtendedTrustManager getTrustManager() {
38         return TrustAllTrustManager.getInstance();
39     }
40 }