comparison app/src/main/java/ch/ethz/ssh2/transport/KexManager.java @ 510:7953570e5210

update to ganymed-ssh2 tag 263 and fix hmac-sha2-512
author Carl Byington <carl@five-ten-sg.com>
date Wed, 01 Feb 2023 17:55:29 -0700
parents d29cce60f393
children
comparison
equal deleted inserted replaced
509:2eb4fa13b9ef 510:7953570e5210
50 private static final ArrayList<String> KEX_ALGS = new ArrayList<String>(); 50 private static final ArrayList<String> KEX_ALGS = new ArrayList<String>();
51 static { 51 static {
52 KEX_ALGS.add("diffie-hellman-group-exchange-sha256"); 52 KEX_ALGS.add("diffie-hellman-group-exchange-sha256");
53 KEX_ALGS.add("diffie-hellman-group-exchange-sha1"); 53 KEX_ALGS.add("diffie-hellman-group-exchange-sha1");
54 KEX_ALGS.add("diffie-hellman-group14-sha1"); 54 KEX_ALGS.add("diffie-hellman-group14-sha1");
55 KEX_ALGS.add("diffie-hellman-group14-sha256");
56 KEX_ALGS.add("diffie-hellman-group16-sha512");
57 KEX_ALGS.add("diffie-hellman-group18-sha512");
55 KEX_ALGS.add("diffie-hellman-group1-sha1"); 58 KEX_ALGS.add("diffie-hellman-group1-sha1");
56 KEX_ALGS.add("ecdh-sha2-nistp256"); 59 KEX_ALGS.add("ecdh-sha2-nistp256");
57 KEX_ALGS.add("ecdh-sha2-nistp384"); 60 KEX_ALGS.add("ecdh-sha2-nistp384");
58 KEX_ALGS.add("ecdh-sha2-nistp521"); 61 KEX_ALGS.add("ecdh-sha2-nistp521");
59 } 62 }
293 296
294 public static String[] getDefaultServerKexAlgorithmList() { 297 public static String[] getDefaultServerKexAlgorithmList() {
295 return KEX_ALGS.toArray(new String[KEX_ALGS.size()]); 298 return KEX_ALGS.toArray(new String[KEX_ALGS.size()]);
296 } 299 }
297 300
298 public static void checkKexAlgorithmList(String[] algos) { 301 public static void checkClientKexAlgorithmList(String[] algos) {
299 for (final String algo : algos) { 302 for (final String algo : algos) {
300 if (!KEX_ALGS.contains(algo)) 303 if (!KEX_ALGS.contains(algo))
301 throw new IllegalArgumentException("Unknown kex algorithm '" + algo + "'"); 304 throw new IllegalArgumentException("Unknown kex algorithm '" + algo + "'");
302 } 305 }
303 } 306 }