2 * Copyright (c) 2010-2022 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.mqtt.internal.ssl;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
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.
21 * @author David Graeff - Initial contribution
24 public interface PinnedCallback {
26 * A public key or certificate hash has been learned. The given pin can be switched
27 * to checking mode now.
29 * @param pin Public Key or Certificate pin
31 void pinnedLearnedHash(Pin pin);
34 * A connection has been accepted
36 void pinnedConnectionAccepted();
39 * A connection has been denied
41 * @param pin The pin object that denied the connection
43 void pinnedConnectionDenied(Pin pin);