Mercurial > 510Connectbot
annotate app/src/main/java/ch/ethz/ssh2/ServerHostKeyVerifier.java @ 509:2eb4fa13b9ef
update 5250 encryption to allow TLS1.3, remove old SSLv2 and SSLv3 methods
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 29 Jan 2023 10:25:21 -0700 |
parents | d29cce60f393 |
children |
rev | line source |
---|---|
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
1 /* |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
2 * Copyright (c) 2006-2011 Christian Plattner. All rights reserved. |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
3 * Please refer to the LICENSE.txt for licensing details. |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
4 */ |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
5 package ch.ethz.ssh2; |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
6 |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
7 /** |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
8 * A callback interface used to implement a client specific method of checking |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
9 * server host keys. |
307 | 10 * |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
11 * @author Christian Plattner |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
12 * @version 2.50, 03/15/10 |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
13 */ |
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
14 |
307 | 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; | |
273
91a31873c42a
start conversion from trilead to ganymed
Carl Byington <carl@five-ten-sg.com>
parents:
diff
changeset
|
33 } |