comparison src/ch/ethz/ssh2/ServerConnection.java @ 300:349847b2e318 ganymed

add ecdsa key support everywhere
author Carl Byington <carl@five-ten-sg.com>
date Tue, 29 Jul 2014 18:36:57 -0700
parents ab3a99f11a36
children ca5dd224a87b
comparison
equal deleted inserted replaced
299:4c3a4e88c027 300:349847b2e318
319 } 319 }
320 320
321 private void fixCryptoWishList(CryptoWishList next_cryptoWishList, KeyPair next_dsa_key, KeyPair next_rsa_key, KeyPair next_ec_key) 321 private void fixCryptoWishList(CryptoWishList next_cryptoWishList, KeyPair next_dsa_key, KeyPair next_rsa_key, KeyPair next_ec_key)
322 { 322 {
323 List<String> algos = new ArrayList<string>(); 323 List<String> algos = new ArrayList<string>();
324 if (next_ec_key != null) algos.add("ecdsa-sha2-nistp521");
325 if (next_ec_key != null) algos.add("ecdsa-sha2-nistp384");
326 if (next_ec_key != null) algos.add("ecdsa-sha2-nistp256");
324 if (next_dsa_key != null) algos.add("ssh-dss"); 327 if (next_dsa_key != null) algos.add("ssh-dss");
325 if (next_rsa_key != null) algos.add("ssh-rsa"); 328 if (next_rsa_key != null) algos.add("ssh-rsa");
326 if (next_ec_key != null) algos.add("ssh-ec");
327 next_cryptoWishList.serverHostKeyAlgorithms = new String[algos.size()]; 329 next_cryptoWishList.serverHostKeyAlgorithms = new String[algos.size()];
328 algos.toArray(next_cryptoWishList.serverHostKeyAlgorithms); 330 algos.toArray(next_cryptoWishList.serverHostKeyAlgorithms);
329 } 331 }
330 332
331 /** 333 /**