5c71dde4e9ecf25c44a1685468d0a3886a2f3b02
[netconf.git] / netconf / callhome-protocol / src / main / java / org / opendaylight / netconf / callhome / protocol / tls / TlsAllowedDevicesMonitor.java
1 /*
2  * Copyright (c) 2020 Pantheon Technologies, s.r.o. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.netconf.callhome.protocol.tls;
9
10 import java.security.PublicKey;
11 import java.util.Optional;
12 import java.util.Set;
13
14 public interface TlsAllowedDevicesMonitor extends AutoCloseable {
15
16     /**
17      * Returns a Call-Home Device ID by the public key.
18      */
19     Optional<String> findDeviceIdByPublicKey(PublicKey publicKey);
20
21     /**
22      * Returns a set of IDs for the keys associated with Call-Home devices.
23      */
24     Set<String> findAllowedKeys();
25
26     @Override
27     void close();
28
29 }