Hi,
+-From: "Viet H. Phan" <[email protected]> --
|_Date: Mon, 30 Aug 2010 03:20:43 -0700 (PDT) _____
|
|I used jsch-0.1.43 to do transfer files with some SFTP servers.
|Everything worked well for me when I set HMAC-SHA1 or HMAC-MD5 as mac.s2c
|and mac.c2s. But when I used HMAC-SHA1-96 or HMAC-MD5-96,
|I kept getting timeout errors.
...
There are implementation bugs in those macs.
Try the following patch,
diff -Naur jsch-0.1.43/src/com/jcraft/jsch/jce/HMACMD596.java
jsch-0.1.43.new/src/com/jcraft/jsch/jce/HMACMD596.java
--- jsch-0.1.43/src/com/jcraft/jsch/jce/HMACMD596.java 2010-03-05
08:07:29.000000000 +0000
+++ jsch-0.1.43.new/src/com/jcraft/jsch/jce/HMACMD596.java 2010-08-24
08:29:49.000000000 +0000
@@ -68,7 +68,7 @@
}
catch(ShortBufferException e){
}
- System.arraycopy(_buf16, 0, buf, 0, 12);
+ System.arraycopy(_buf16, 0, buf, offset, 12);
}
public String getName(){
diff -Naur jsch-0.1.43/src/com/jcraft/jsch/jce/HMACSHA196.java
jsch-0.1.43.new/src/com/jcraft/jsch/jce/HMACSHA196.java
--- jsch-0.1.43/src/com/jcraft/jsch/jce/HMACSHA196.java 2010-03-05
08:07:39.000000000 +0000
+++ jsch-0.1.43.new/src/com/jcraft/jsch/jce/HMACSHA196.java 2010-08-24
08:29:19.000000000 +0000
@@ -67,7 +67,7 @@
}
catch(ShortBufferException e){
}
- System.arraycopy(_buf20, 0, buf, 0, 12);
+ System.arraycopy(_buf20, 0, buf, offset, 12);
}
public String getName(){
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users