comparison src/ch/ethz/ssh2/transport/ClientKexManager.java @ 285:486df527ddc5 ganymed

start conversion from trilead to ganymed
author Carl Byington <carl@five-ten-sg.com>
date Fri, 18 Jul 2014 18:33:40 -0700
parents 4ec87de11e71
children db9b028016de
comparison
equal deleted inserted replaced
284:4ec87de11e71 285:486df527ddc5
56 56
57 protected boolean verifySignature(byte[] sig, byte[] hostkey) throws IOException { 57 protected boolean verifySignature(byte[] sig, byte[] hostkey) throws IOException {
58 if (kxs.np.server_host_key_algo.startsWith("ecdsa-sha2-")) { 58 if (kxs.np.server_host_key_algo.startsWith("ecdsa-sha2-")) {
59 byte[] rs = ECDSASHA2Verify.decodeSSHECDSASignature(sig); 59 byte[] rs = ECDSASHA2Verify.decodeSSHECDSASignature(sig);
60 ECPublicKey epk = ECDSASHA2Verify.decodeSSHECDSAPublicKey(hostkey); 60 ECPublicKey epk = ECDSASHA2Verify.decodeSSHECDSAPublicKey(hostkey);
61 log.log(50, "Verifying ecdsa signature"); 61 log.debug(50, "Verifying ecdsa signature");
62 return ECDSASHA2Verify.verifySignature(kxs.H, rs, epk); 62 return ECDSASHA2Verify.verifySignature(kxs.H, rs, epk);
63 } 63 }
64 if (kxs.np.server_host_key_algo.equals("ssh-rsa")) { 64 if (kxs.np.server_host_key_algo.equals("ssh-rsa")) {
65 byte[] rs = RSASHA1Verify.decodeSSHRSASignature(sig); 65 byte[] rs = RSASHA1Verify.decodeSSHRSASignature(sig);
66 RSAPublicKey rpk = RSASHA1Verify.decodeSSHRSAPublicKey(hostkey); 66 RSAPublicKey rpk = RSASHA1Verify.decodeSSHRSAPublicKey(hostkey);