]> git.basschouten.com Git - openhab-addons.git/blob
b925effd4a312abc9b2a6398c6740f9fc58eb2b0
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 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.mqtt.internal.ssl;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Implement this to be notified by the {@link PinTrustManager} if a connection was
19  * accepted or denied and if a Pin switched from learning mode to checking mode.
20  *
21  * @author David Graeff - Initial contribution
22  */
23 @NonNullByDefault
24 public interface PinnedCallback {
25     /**
26      * A public key or certificate hash has been learned. The given pin can be switched
27      * to checking mode now.
28      *
29      * @param pin Public Key or Certificate pin
30      */
31     void pinnedLearnedHash(Pin pin);
32
33     /**
34      * A connection has been accepted
35      */
36     void pinnedConnectionAccepted();
37
38     /**
39      * A connection has been denied
40      *
41      * @param pin The pin object that denied the connection
42      */
43     void pinnedConnectionDenied(Pin pin);
44 }