Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/ServerHostKeyVerifier.java @ 308:42b15aaa7ac7 ganymed
merge
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:21:50 -0700 |
parents | 071eccdff8ea |
children |
comparison
equal
deleted
inserted
replaced
306:90e47d99ea54 | 308:42b15aaa7ac7 |
---|---|
5 package ch.ethz.ssh2; | 5 package ch.ethz.ssh2; |
6 | 6 |
7 /** | 7 /** |
8 * A callback interface used to implement a client specific method of checking | 8 * A callback interface used to implement a client specific method of checking |
9 * server host keys. | 9 * server host keys. |
10 * | 10 * |
11 * @author Christian Plattner | 11 * @author Christian Plattner |
12 * @version 2.50, 03/15/10 | 12 * @version 2.50, 03/15/10 |
13 */ | 13 */ |
14 | 14 |
15 public interface ServerHostKeyVerifier | 15 public interface ServerHostKeyVerifier { |
16 { | 16 /** |
17 /** | 17 * The actual verifier method, it will be called by the key exchange code |
18 * 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 * on EVERY key exchange - this can happen several times during the lifetime | 19 * of a connection. |
20 * of a connection. | 20 * <p> |
21 * <p> | 21 * Note: SSH-2 servers are allowed to change their hostkey at ANY time. |
22 * Note: SSH-2 servers are allowed to change their hostkey at ANY time. | 22 * |
23 * | 23 * @param hostname the hostname used to create the {@link Connection} object |
24 * @param hostname the hostname used to create the {@link Connection} object | 24 * @param port the remote TCP port |
25 * @param port the remote TCP port | 25 * @param serverHostKeyAlgorithm the public key algorithm (<code>ssh-rsa</code> or <code>ssh-dss</code>) |
26 * @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 * @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 * @return if the client wants to accept the server's host key - if not, the | 28 * connection will be closed. |
29 * connection will be closed. | 29 * @throws Exception Will be wrapped with an IOException, extended version of returning false =) |
30 * @throws Exception Will be wrapped with an IOException, extended version of returning false =) | 30 */ |
31 */ | 31 public boolean verifyServerHostKey(String hostname, int port, String serverHostKeyAlgorithm, byte[] serverHostKey) |
32 public boolean verifyServerHostKey(String hostname, int port, String serverHostKeyAlgorithm, byte[] serverHostKey) | 32 throws Exception; |
33 throws Exception; | |
34 } | 33 } |