Mercurial > 510Connectbot
comparison app/src/main/java/ch/ethz/ssh2/ServerHostKeyVerifier.java @ 438:d29cce60f393
migrate from Eclipse to Android Studio
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Thu, 03 Dec 2015 11:23:55 -0800 |
parents | src/ch/ethz/ssh2/ServerHostKeyVerifier.java@071eccdff8ea |
children |
comparison
equal
deleted
inserted
replaced
437:208b31032318 | 438:d29cce60f393 |
---|---|
1 /* | |
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved. | |
3 * Please refer to the LICENSE.txt for licensing details. | |
4 */ | |
5 package ch.ethz.ssh2; | |
6 | |
7 /** | |
8 * A callback interface used to implement a client specific method of checking | |
9 * server host keys. | |
10 * | |
11 * @author Christian Plattner | |
12 * @version 2.50, 03/15/10 | |
13 */ | |
14 | |
15 public interface ServerHostKeyVerifier { | |
16 /** | |
17 * The actual verifier method, it will be called by the key exchange code | |
18 * on EVERY key exchange - this can happen several times during the lifetime | |
19 * of a connection. | |
20 * <p> | |
21 * Note: SSH-2 servers are allowed to change their hostkey at ANY time. | |
22 * | |
23 * @param hostname the hostname used to create the {@link Connection} object | |
24 * @param port the remote TCP port | |
25 * @param serverHostKeyAlgorithm the public key algorithm (<code>ssh-rsa</code> or <code>ssh-dss</code>) | |
26 * @param serverHostKey the server's public key blob | |
27 * @return if the client wants to accept the server's host key - if not, the | |
28 * connection will be closed. | |
29 * @throws Exception Will be wrapped with an IOException, extended version of returning false =) | |
30 */ | |
31 public boolean verifyServerHostKey(String hostname, int port, String serverHostKeyAlgorithm, byte[] serverHostKey) | |
32 throws Exception; | |
33 } |