comparison src/ch/ethz/ssh2/channel/AuthAgentForwardThread.java @ 304:abad243cb341 ganymed

add ecdsa key support everywhere
author Carl Byington <carl@five-ten-sg.com>
date Tue, 29 Jul 2014 20:28:01 -0700
parents a218d9cd725b
children 071eccdff8ea
comparison
equal deleted inserted replaced
303:a218d9cd725b 304:abad243cb341
463 (DSAPrivateKey) privKey, new SecureRandom()); 463 (DSAPrivateKey) privKey, new SecureRandom());
464 response = DSASHA1Verify.encodeSSHDSASignature(signature); 464 response = DSASHA1Verify.encodeSSHDSASignature(signature);
465 } 465 }
466 else if (privKey instanceof ECPrivateKey) { 466 else if (privKey instanceof ECPrivateKey) {
467 ECPrivateKey pk = (ECPrivateKey) privKey; 467 ECPrivateKey pk = (ECPrivateKey) privKey;
468 byte[] signature = ECDSASHA2Verify.generateSignature(challenge, 468 byte[] signature = ECDSASHA2Verify.generateSignature(challenge, pk);
469 (ECPrivateKey) privKey, pk.getParams()); 469 response = ECDSASHA2Verify.encodeSSHECDSASignature(signature, pk.getParams());
470 response = ECDSASHA2Verify.encodeSSHECDSASignature(signature);
471 } 470 }
472 else { 471 else {
473 os.write(SSH_AGENT_FAILURE); 472 os.write(SSH_AGENT_FAILURE);
474 return; 473 return;
475 } 474 }