diff src/ch/ethz/ssh2/channel/AuthAgentForwardThread.java @ 344:b40bc65fa09a

compensate for SecureRandom bug on older devices
author Carl Byington <carl@five-ten-sg.com>
date Thu, 31 Jul 2014 18:39:36 -0700
parents 071eccdff8ea
children
line wrap: on
line diff
--- a/src/ch/ethz/ssh2/channel/AuthAgentForwardThread.java	Thu Jul 31 17:30:36 2014 -0700
+++ b/src/ch/ethz/ssh2/channel/AuthAgentForwardThread.java	Thu Jul 31 18:39:36 2014 -0700
@@ -26,7 +26,6 @@
 import java.security.NoSuchAlgorithmException;
 import java.security.PrivateKey;
 import java.security.PublicKey;
-import java.security.SecureRandom;
 import java.security.interfaces.DSAPrivateKey;
 import java.security.interfaces.ECPrivateKey;
 import java.security.interfaces.RSAPrivateKey;
@@ -44,6 +43,7 @@
 import java.util.Map.Entry;
 
 import ch.ethz.ssh2.AuthAgentCallback;
+import ch.ethz.ssh2.crypto.SecureRandomFix;
 import ch.ethz.ssh2.log.Logger;
 import ch.ethz.ssh2.packets.TypesReader;
 import ch.ethz.ssh2.packets.TypesWriter;
@@ -459,7 +459,7 @@
             }
             else if (privKey instanceof DSAPrivateKey) {
                 byte[] signature = DSASHA1Verify.generateSignature(challenge,
-                                   (DSAPrivateKey) privKey, new SecureRandom());
+                                   (DSAPrivateKey) privKey, new SecureRandomFix());
                 response = DSASHA1Verify.encodeSSHDSASignature(signature);
             }
             else if (privKey instanceof ECPrivateKey) {