diff -Nru jsch-0.1.54/build.xml jsch-0.1.55/build.xml
--- jsch-0.1.54/build.xml 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/build.xml 2017-11-29 07:24:35.000000000 +0000
@@ -5,7 +5,7 @@
you can integrate its functionality into your own Java programs
-
+
diff -Nru jsch-0.1.54/ChangeLog jsch-0.1.55/ChangeLog
--- jsch-0.1.54/ChangeLog 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/ChangeLog 2018-11-24 02:46:55.000000000 +0000
@@ -1,6 +1,24 @@
ChangeLog of JSch
====================================================================
-Last modified: Tue Aug 30 06:47:52 UTC 2016
+Last modified: Thu Nov 22 01:06:27 UTC 2018
+
+
+Changes since version 0.1.54:
+- bugfix: fixed vulnerabilities in examples;
+ ScpTo.java, ScpFrom.java and ScpNoneCipher.java,
+ https://gist.github.com/ymnk/2318108/revisions#diff-a5ec82fe8ccb2efa64aa42a5592bb137
+ https://gist.github.com/ymnk/2318108/revisions#diff-c1b069ab3a670f4fd3270d0f57550007
+ https://gist.github.com/ymnk/2318108/revisions#diff-a20032aa3cc9119fa627ec948b9ada46
+ thanks to Dylan Katz(http://dylankatz.com).
+- bugfix: OpenSSHConfig#getUser() should not overwrite the given user-name.
+- bugfix: fixed 'Invalid encoding for signature' errors in ssh-dss.
+- bugfix: fixed bugs in the key-exchange for ecdsa-sha2-nistp384,
+ ecdsa-sha2-nistp521.
+- bugfix: failed to generate the key pair from private keys,
+ ecdsa 384 and 521.
+- bugfix: failed to load the ecdsa 521 key identity from ssh-add command.
+- change: updating copyright messages; 2016 -> 2018
+- feature: supporting key files on EBCDIC environment.
Changes since version 0.1.53:
diff -Nru jsch-0.1.54/debian/changelog jsch-0.1.55/debian/changelog
--- jsch-0.1.54/debian/changelog 2016-09-01 20:32:59.000000000 +0000
+++ jsch-0.1.55/debian/changelog 2018-12-10 22:37:40.000000000 +0000
@@ -1,3 +1,12 @@
+jsch (0.1.55-1) unstable; urgency=medium
+
+ * New upstream release
+ * Standards-Version updated to 4.2.1
+ * Switch to debhelper level 11
+ * Use salsa.debian.org Vcs-* URLs
+
+ -- Emmanuel Bourg Mon, 10 Dec 2018 23:37:40 +0100
+
jsch (0.1.54-1) unstable; urgency=medium
* Team upload.
diff -Nru jsch-0.1.54/debian/compat jsch-0.1.55/debian/compat
--- jsch-0.1.54/debian/compat 2016-09-01 20:32:59.000000000 +0000
+++ jsch-0.1.55/debian/compat 2018-12-10 22:28:28.000000000 +0000
@@ -1 +1 @@
-9
+11
diff -Nru jsch-0.1.54/debian/control jsch-0.1.55/debian/control
--- jsch-0.1.54/debian/control 2016-09-01 20:32:59.000000000 +0000
+++ jsch-0.1.55/debian/control 2018-12-10 22:28:28.000000000 +0000
@@ -2,12 +2,18 @@
Section: java
Priority: optional
Maintainer: Debian Java Maintainers
-Uploaders: Emmanuel Bourg , Ludovic Claude ,
-Build-Depends: debhelper (>= 9), default-jdk
-Build-Depends-Indep: maven-repo-helper, ant (>= 1.6.5), libjzlib-java
-Standards-Version: 3.9.8
-Vcs-Git: https://anonscm.debian.org/git/pkg-java/jsch.git
-Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/jsch.git
+Uploaders:
+ Emmanuel Bourg ,
+ Ludovic Claude
+Build-Depends:
+ ant (>= 1.6.5),
+ debhelper (>= 11),
+ default-jdk,
+ libjzlib-java,
+ maven-repo-helper
+Standards-Version: 4.2.1
+Vcs-Git: https://salsa.debian.org/java-team/jsch.git
+Vcs-Browser: https://salsa.debian.org/java-team/jsch
Homepage: http://www.jcraft.com/jsch/
Package: libjsch-java
diff -Nru jsch-0.1.54/debian/rules jsch-0.1.55/debian/rules
--- jsch-0.1.54/debian/rules 2016-09-01 20:32:59.000000000 +0000
+++ jsch-0.1.55/debian/rules 2018-12-10 22:28:28.000000000 +0000
@@ -14,6 +14,3 @@
override_dh_compress:
dh_compress -X.java
-
-get-orig-source:
- uscan --download-current-version --force-download --rename --repack --compression xz
diff -Nru jsch-0.1.54/examples/ScpFrom.java jsch-0.1.55/examples/ScpFrom.java
--- jsch-0.1.54/examples/ScpFrom.java 2012-04-18 07:09:23.000000000 +0000
+++ jsch-0.1.55/examples/ScpFrom.java 2018-11-21 02:54:40.000000000 +0000
@@ -43,6 +43,8 @@
session.connect();
// exec 'scp -f rfile' remotely
+ rfile=rfile.replace("'", "'\"'\"'");
+ rfile="'"+rfile+"'";
String command="scp -f "+rfile;
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand(command);
diff -Nru jsch-0.1.54/examples/ScpTo.java jsch-0.1.55/examples/ScpTo.java
--- jsch-0.1.54/examples/ScpTo.java 2015-05-26 01:49:24.000000000 +0000
+++ jsch-0.1.55/examples/ScpTo.java 2018-11-21 15:15:34.000000000 +0000
@@ -40,6 +40,8 @@
boolean ptimestamp = true;
// exec 'scp -t rfile' remotely
+ rfile=rfile.replace("'", "'\"'\"'");
+ rfile="'"+rfile+"'";
String command="scp " + (ptimestamp ? "-p" :"") +" -t "+rfile;
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand(command);
@@ -57,7 +59,7 @@
File _lfile = new File(lfile);
if(ptimestamp){
- command="T"+(_lfile.lastModified()/1000)+" 0";
+ command="T "+(_lfile.lastModified()/1000)+" 0";
// The access time should be sent here,
// but it is not accessible with JavaAPI ;-<
command+=(" "+(_lfile.lastModified()/1000)+" 0\n");
diff -Nru jsch-0.1.54/examples/ScpToNoneCipher.java jsch-0.1.55/examples/ScpToNoneCipher.java
--- jsch-0.1.54/examples/ScpToNoneCipher.java 2012-04-18 08:10:05.000000000 +0000
+++ jsch-0.1.55/examples/ScpToNoneCipher.java 2018-11-21 02:54:57.000000000 +0000
@@ -38,6 +38,8 @@
session.rekey();
// exec 'scp -t rfile' remotely
+ rfile=rfile.replace("'", "'\"'\"'");
+ rfile="'"+rfile+"'";
String command="scp -p -t "+rfile;
Channel channel=session.openChannel("exec");
((ChannelExec)channel).setCommand(command);
diff -Nru jsch-0.1.54/pom.xml jsch-0.1.55/pom.xml
--- jsch-0.1.54/pom.xml 2015-05-27 18:48:50.000000000 +0000
+++ jsch-0.1.55/pom.xml 2017-11-29 07:24:50.000000000 +0000
@@ -4,7 +4,7 @@
com.jcraft
jsch
jar
- 0.1.53
+ 0.1.55
JSch
http://www.jcraft.com/jsch/
JSch is a pure Java implementation of SSH2
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/Buffer.java jsch-0.1.55/src/main/java/com/jcraft/jsch/Buffer.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/Buffer.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/Buffer.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelAgentForwarding.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelAgentForwarding.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelAgentForwarding.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelAgentForwarding.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2006-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2006-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelDirectTCPIP.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelDirectTCPIP.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelDirectTCPIP.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelDirectTCPIP.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelExec.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelExec.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelExec.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelExec.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelForwardedTCPIP.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelForwardedTCPIP.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelForwardedTCPIP.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelForwardedTCPIP.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/Channel.java jsch-0.1.55/src/main/java/com/jcraft/jsch/Channel.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/Channel.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/Channel.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSession.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSession.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSession.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSession.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSftp.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSftp.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSftp.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSftp.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelShell.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelShell.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelShell.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelShell.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSubsystem.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSubsystem.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelSubsystem.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelSubsystem.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2005-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2005-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelX11.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelX11.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ChannelX11.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ChannelX11.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/Cipher.java jsch-0.1.55/src/main/java/com/jcraft/jsch/Cipher.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/Cipher.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/Cipher.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/CipherNone.java jsch-0.1.55/src/main/java/com/jcraft/jsch/CipherNone.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/CipherNone.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/CipherNone.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/Compression.java jsch-0.1.55/src/main/java/com/jcraft/jsch/Compression.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/Compression.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/Compression.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ConfigRepository.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ConfigRepository.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ConfigRepository.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ConfigRepository.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2013-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2013-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC256.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC384.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC384.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC384.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC384.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC521.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC521.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHEC521.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHEC521.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHECN.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHECN.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHECN.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHECN.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHG14.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHG14.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHG14.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHG14.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHG1.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHG1.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHG1.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHG1.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHGEX256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHGEX256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHGEX256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHGEX256.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DHGEX.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DHGEX.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DHGEX.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DHGEX.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/DH.java jsch-0.1.55/src/main/java/com/jcraft/jsch/DH.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/DH.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/DH.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ECDH.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ECDH.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ECDH.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ECDH.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/ForwardedTCPIPDaemon.java jsch-0.1.55/src/main/java/com/jcraft/jsch/ForwardedTCPIPDaemon.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/ForwardedTCPIPDaemon.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/ForwardedTCPIPDaemon.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/GSSContext.java jsch-0.1.55/src/main/java/com/jcraft/jsch/GSSContext.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/GSSContext.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/GSSContext.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2004-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2004-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/HASH.java jsch-0.1.55/src/main/java/com/jcraft/jsch/HASH.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/HASH.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/HASH.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/HostKey.java jsch-0.1.55/src/main/java/com/jcraft/jsch/HostKey.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/HostKey.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/HostKey.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/HostKeyRepository.java jsch-0.1.55/src/main/java/com/jcraft/jsch/HostKeyRepository.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/HostKeyRepository.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/HostKeyRepository.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2004-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2004-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/IdentityFile.java jsch-0.1.55/src/main/java/com/jcraft/jsch/IdentityFile.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/IdentityFile.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/IdentityFile.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -93,7 +93,13 @@
* @return "ssh-rsa" or "ssh-dss"
*/
public String getAlgName(){
- return new String(kpair.getKeyTypeName());
+ byte[] name = kpair.getKeyTypeName();
+ try {
+ return new String(name, "UTF-8");
+ }
+ catch (UnsupportedEncodingException e){
+ return new String(name);
+ }
}
/**
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/Identity.java jsch-0.1.55/src/main/java/com/jcraft/jsch/Identity.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/Identity.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/Identity.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/IdentityRepository.java jsch-0.1.55/src/main/java/com/jcraft/jsch/IdentityRepository.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/IdentityRepository.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/IdentityRepository.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2012-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/IO.java jsch-0.1.55/src/main/java/com/jcraft/jsch/IO.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/IO.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/IO.java 2018-11-20 10:58:54.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES128CBC.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES128CBC.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES128CBC.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES128CBC.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2005-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2005-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES128CTR.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES128CTR.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES128CTR.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES128CTR.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES192CBC.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES192CBC.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES192CBC.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES192CBC.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2005-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2005-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES192CTR.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES192CTR.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES192CTR.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES192CTR.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES256CBC.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES256CBC.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES256CBC.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES256CBC.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2005-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2005-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES256CTR.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES256CTR.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/AES256CTR.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/AES256CTR.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR128.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR128.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR128.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR128.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR256.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ARCFOUR.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ARCFOUR.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2008-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2008-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/BlowfishCBC.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/BlowfishCBC.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/BlowfishCBC.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/BlowfishCBC.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/DH.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/DH.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/DH.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/DH.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH256.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH384.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH384.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH384.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH384.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH521.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH521.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDH521.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDH521.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDHN.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDHN.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/ECDHN.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/ECDHN.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMAC.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMAC.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMAC.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMAC.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2012-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACMD596.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACMD596.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACMD596.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACMD596.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACMD5.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACMD5.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACMD5.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACMD5.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA196.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA196.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA196.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA196.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA1.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA1.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA1.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA1.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA256.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2012-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA512.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA512.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/HMACSHA512.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/HMACSHA512.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2012-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2012-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenDSA.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenDSA.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenDSA.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenDSA.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenECDSA.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenECDSA.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenECDSA.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenECDSA.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenRSA.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenRSA.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/KeyPairGenRSA.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/KeyPairGenRSA.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/MD5.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/MD5.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/MD5.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/MD5.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/PBKDF.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/PBKDF.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/PBKDF.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/PBKDF.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2013-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2013-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/Random.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/Random.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/Random.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/Random.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA1.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA1.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA1.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA1.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA256.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA256.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA384.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA384.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA384.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA384.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA512.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA512.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SHA512.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SHA512.java 2018-11-20 10:58:55.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureDSA.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureDSA.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureDSA.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureDSA.java 2018-11-24 02:43:08.000000000 +0000
@@ -1,6 +1,6 @@
/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
/*
-Copyright (c) 2002-2016 ymnk, JCraft,Inc. All rights reserved.
+Copyright (c) 2002-2018 ymnk, JCraft,Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -32,6 +32,7 @@
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
+import com.jcraft.jsch.Buffer;
public class SignatureDSA implements com.jcraft.jsch.SignatureDSA{
@@ -106,42 +107,51 @@
int i=0;
int j=0;
byte[] tmp;
+ Buffer buf=new Buffer(sig);
- if(sig[0]==0 && sig[1]==0 && sig[2]==0){
- j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)|
- ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff);
- i+=j;
- j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)|
- ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff);
- tmp=new byte[j];
- System.arraycopy(sig, i, tmp, 0, j); sig=tmp;
+ if(new String(buf.getString()).equals("ssh-dss")){
+ j=buf.getInt();
+ i=buf.getOffSet();
+ tmp=new byte[j];
+ System.arraycopy(sig, i, tmp, 0, j); sig=tmp;
}
+ byte[] _frst=new byte[20];
+ System.arraycopy(sig, 0, _frst, 0, 20);
+ _frst=normalize(_frst);
+
+ byte[] _scnd=new byte[20];
+ System.arraycopy(sig, 20, _scnd, 0, 20);
+ _scnd=normalize(_scnd);
+
// ASN.1
- int frst=((sig[0]&0x80)!=0?1:0);
- int scnd=((sig[20]&0x80)!=0?1:0);
- //System.err.println("frst: "+frst+", scnd: "+scnd);
+ int frst=((_frst[0]&0x80)!=0?1:0);
+ int scnd=((_scnd[0]&0x80)!=0?1:0);
- int length=sig.length+6+frst+scnd;
+ int length=_frst.length+_scnd.length+6+frst+scnd;
tmp=new byte[length];
- tmp[0]=(byte)0x30; tmp[1]=(byte)0x2c;
+ tmp[0]=(byte)0x30; tmp[1]=(byte)(_frst.length+_scnd.length+4);
tmp[1]+=frst; tmp[1]+=scnd;
- tmp[2]=(byte)0x02; tmp[3]=(byte)0x14;
+ tmp[2]=(byte)0x02; tmp[3]=(byte)_frst.length;
tmp[3]+=frst;
- System.arraycopy(sig, 0, tmp, 4+frst, 20);
- tmp[4+tmp[3]]=(byte)0x02; tmp[5+tmp[3]]=(byte)0x14;
+ System.arraycopy(_frst, 0, tmp, 4+frst, _frst.length);
+ tmp[4+tmp[3]]=(byte)0x02; tmp[5+tmp[3]]=(byte)_scnd.length;
tmp[5+tmp[3]]+=scnd;
- System.arraycopy(sig, 20, tmp, 6+tmp[3]+scnd, 20);
+ System.arraycopy(_scnd, 0, tmp, 6+tmp[3]+scnd, _scnd.length);
sig=tmp;
-/*
- tmp=new byte[sig.length+6];
- tmp[0]=(byte)0x30; tmp[1]=(byte)0x2c;
- tmp[2]=(byte)0x02; tmp[3]=(byte)0x14;
- System.arraycopy(sig, 0, tmp, 4, 20);
- tmp[24]=(byte)0x02; tmp[25]=(byte)0x14;
- System.arraycopy(sig, 20, tmp, 26, 20); sig=tmp;
-*/
return signature.verify(sig);
}
+
+ protected byte[] normalize(byte[] secret) {
+ if(secret.length > 1 &&
+ secret[0] == 0 && (secret[1]&0x80) == 0) {
+ byte[] tmp=new byte[secret.length-1];
+ System.arraycopy(secret, 1, tmp, 0, tmp.length);
+ return normalize(tmp);
+ }
+ else {
+ return secret;
+ }
+ }
}
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA256.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA256.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA256.java 1970-01-01 00:00:00.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA256.java 2018-11-20 10:58:55.000000000 +0000
@@ -0,0 +1,41 @@
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+/*
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.jcraft.jsch.jce;
+
+import java.math.BigInteger;
+import java.security.*;
+import java.security.spec.*;
+import com.jcraft.jsch.Buffer;
+
+public class SignatureECDSA256 extends SignatureECDSAN {
+ String getName() {
+ return "ecdsa-sha2-nistp256";
+ }
+}
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA384.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA384.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA384.java 1970-01-01 00:00:00.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA384.java 2018-11-20 10:58:55.000000000 +0000
@@ -0,0 +1,41 @@
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+/*
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.jcraft.jsch.jce;
+
+import java.math.BigInteger;
+import java.security.*;
+import java.security.spec.*;
+import com.jcraft.jsch.Buffer;
+
+public class SignatureECDSA384 extends SignatureECDSAN {
+ String getName() {
+ return "ecdsa-sha2-nistp384";
+ }
+}
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA521.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA521.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA521.java 1970-01-01 00:00:00.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA521.java 2018-11-20 10:58:55.000000000 +0000
@@ -0,0 +1,41 @@
+/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
+/*
+Copyright (c) 2015-2018 ymnk, JCraft,Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in
+ the documentation and/or other materials provided with the distribution.
+
+ 3. The names of the authors may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
+INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.jcraft.jsch.jce;
+
+import java.math.BigInteger;
+import java.security.*;
+import java.security.spec.*;
+import com.jcraft.jsch.Buffer;
+
+public class SignatureECDSA521 extends SignatureECDSAN {
+ String getName() {
+ return "ecdsa-sha2-nistp521";
+ }
+}
diff -Nru jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA.java jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA.java
--- jsch-0.1.54/src/main/java/com/jcraft/jsch/jce/SignatureECDSA.java 2016-08-30 07:06:39.000000000 +0000
+++ jsch-0.1.55/src/main/java/com/jcraft/jsch/jce/SignatureECDSA.java 1970-01-01 00:00:00.000000000 +0000
@@ -1,186 +0,0 @@
-/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */
-/*
-Copyright (c) 2015-2016 ymnk, JCraft,Inc. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the distribution.
-
- 3. The names of the authors may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
-INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
-OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-package com.jcraft.jsch.jce;
-
-import java.math.BigInteger;
-import java.security.*;
-import java.security.spec.*;
-import com.jcraft.jsch.Buffer;
-
-public class SignatureECDSA implements com.jcraft.jsch.SignatureECDSA {
-
- Signature signature;
- KeyFactory keyFactory;
-
- public void init() throws Exception{
- signature=java.security.Signature.getInstance("SHA256withECDSA");
- keyFactory=KeyFactory.getInstance("EC");
- }
-
- public void setPubKey(byte[] r, byte[] s) throws Exception{
-
- // r and s must be unsigned values.
- r=insert0(r);
- s=insert0(s);
-
- String name="secp256r1";
- if(r.length>=64) name="secp521r1";
- else if(r.length>=48) name="secp384r1";
-
- AlgorithmParameters param = AlgorithmParameters.getInstance("EC");
- param.init(new ECGenParameterSpec(name));
- ECParameterSpec ecparam =
- (ECParameterSpec)param.getParameterSpec(ECParameterSpec.class);
- ECPoint w = new ECPoint(new BigInteger(1, r), new BigInteger(1, s));
- PublicKey pubKey =
- keyFactory.generatePublic(new ECPublicKeySpec(w, ecparam));
- signature.initVerify(pubKey);
- }
-
- public void setPrvKey(byte[] d) throws Exception{
-
- // d must be unsigned value.
- d=insert0(d);
-
- String name="secp256r1";
- if(d.length>=64) name="secp521r1";
- else if(d.length>=48) name="secp384r1";
-
- AlgorithmParameters param = AlgorithmParameters.getInstance("EC");
- param.init(new ECGenParameterSpec(name));
- ECParameterSpec ecparam =
- (ECParameterSpec)param.getParameterSpec(ECParameterSpec.class);
- BigInteger _d = new BigInteger(1, d);
- PrivateKey prvKey =
- keyFactory.generatePrivate(new ECPrivateKeySpec(_d, ecparam));
- signature.initSign(prvKey);
- }
- public byte[] sign() throws Exception{
- byte[] sig=signature.sign();
-
- // It seems that the output from SunEC is in ASN.1,
- // so we have to convert it.
- if(sig[0]==0x30 && // in ASN.1
- ((sig[1]+2 == sig.length) ||
- ((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length))){// 2bytes for len
-
- int index=3;
- if((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length)
- index=4;
-
- byte[] r = new byte[sig[index]];
- byte[] s = new byte[sig[index+2+sig[index]]];
- System.arraycopy(sig, index+1, r, 0, r.length);
- System.arraycopy(sig, index+3+sig[index], s, 0, s.length);
-
- r = chop0(r);
- s = chop0(s);
-
- Buffer buf = new Buffer();
- buf.putMPInt(r);
- buf.putMPInt(s);
-
- sig=new byte[buf.getLength()];
- buf.setOffSet(0);
- buf.getByte(sig);
- }
-
- return sig;
- }
- public void update(byte[] foo) throws Exception{
- signature.update(foo);
- }
- public boolean verify(byte[] sig) throws Exception{
-
- // It seems that SunEC expects ASN.1 data,
- // so we have to convert it.
- if(!(sig[0]==0x30 && // not in ASN.1
- ((sig[1]+2 == sig.length) ||
- ((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length)))) {
- Buffer b = new Buffer(sig);
-
- b.getString(); // ecdsa-sha2-nistp256
- b.getInt();
-
- byte[] r = b.getMPInt();
- byte[] s = b.getMPInt();
-
- r=insert0(r);
- s=insert0(s);
-
- byte[] asn1 = null;
- if(r.length<64){
- asn1 = new byte[6+r.length+s.length];
- asn1[0] = (byte)0x30;
- asn1[1] = (byte)(4+r.length+s.length);
- asn1[2] = (byte)0x02;
- asn1[3] = (byte)r.length;
- System.arraycopy(r, 0, asn1, 4, r.length);
- asn1[r.length+4] = (byte)0x02;
- asn1[r.length+5] = (byte)s.length;
- System.arraycopy(s, 0, asn1, (6+r.length), s.length);
- }
- else {
- asn1 = new byte[6+r.length+s.length+1];
- asn1[0] = (byte)0x30;
- asn1[1] = (byte)0x81;
- asn1[2] = (byte)(4+r.length+s.length);
- asn1[3] = (byte)0x02;
- asn1[4] = (byte)r.length;
- System.arraycopy(r, 0, asn1, 5, r.length);
- asn1[r.length+5] = (byte)0x02;
- asn1[r.length+6] = (byte)s.length;
- System.arraycopy(s, 0, asn1, (7+r.length), s.length);
- }
- sig=asn1;
- }
-
- return signature.verify(sig);
- }
-
- private byte[] insert0(byte[] buf){
- if ((buf[0] & 0x80) == 0) return buf;
- byte[] tmp = new byte[buf.length+1];
- System.arraycopy(buf, 0, tmp, 1, buf.length);
- bzero(buf);
- return tmp;
- }
- private byte[] chop0(byte[] buf){
- if(buf[0]!=0) return buf;
- byte[] tmp = new byte[buf.length-1];
- System.arraycopy(buf, 1, tmp, 0, tmp.length);
- bzero(buf);
- return tmp;
- }
-
- private void bzero(byte[] buf){
- for(int i = 0; i=64) name="secp521r1";
+ else if(r.length>=48) name="secp384r1";
+
+ AlgorithmParameters param = AlgorithmParameters.getInstance("EC");
+ param.init(new ECGenParameterSpec(name));
+ ECParameterSpec ecparam =
+ (ECParameterSpec)param.getParameterSpec(ECParameterSpec.class);
+ ECPoint w = new ECPoint(new BigInteger(1, r), new BigInteger(1, s));
+ PublicKey pubKey =
+ keyFactory.generatePublic(new ECPublicKeySpec(w, ecparam));
+ signature.initVerify(pubKey);
+ }
+
+ public void setPrvKey(byte[] d) throws Exception{
+
+ // d must be unsigned value.
+ d=insert0(d);
+
+ String name="secp256r1";
+ if(d.length>=64) name="secp521r1";
+ else if(d.length>=48) name="secp384r1";
+
+ AlgorithmParameters param = AlgorithmParameters.getInstance("EC");
+ param.init(new ECGenParameterSpec(name));
+ ECParameterSpec ecparam =
+ (ECParameterSpec)param.getParameterSpec(ECParameterSpec.class);
+ BigInteger _d = new BigInteger(1, d);
+ PrivateKey prvKey =
+ keyFactory.generatePrivate(new ECPrivateKeySpec(_d, ecparam));
+ signature.initSign(prvKey);
+ }
+ public byte[] sign() throws Exception{
+ byte[] sig=signature.sign();
+
+ // It seems that the output from SunEC is in ASN.1,
+ // so we have to convert it.
+ if(sig[0]==0x30 && // in ASN.1
+ ((sig[1]+2 == sig.length) ||
+ ((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length))){// 2bytes for len
+
+ int index=3;
+ if((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length)
+ index=4;
+
+ byte[] r = new byte[sig[index]];
+ byte[] s = new byte[sig[index+2+sig[index]]];
+ System.arraycopy(sig, index+1, r, 0, r.length);
+ System.arraycopy(sig, index+3+sig[index], s, 0, s.length);
+
+ r = chop0(r);
+ s = chop0(s);
+
+ Buffer buf = new Buffer();
+ buf.putMPInt(r);
+ buf.putMPInt(s);
+
+ sig=new byte[buf.getLength()];
+ buf.setOffSet(0);
+ buf.getByte(sig);
+ }
+
+ return sig;
+ }
+ public void update(byte[] foo) throws Exception{
+ signature.update(foo);
+ }
+ public boolean verify(byte[] sig) throws Exception{
+
+ // It seems that SunEC expects ASN.1 data,
+ // so we have to convert it.
+ if(!(sig[0]==0x30 && // not in ASN.1
+ ((sig[1]+2 == sig.length) ||
+ ((sig[1]&0x80)!=0 && (sig[2]&0xff)+3==sig.length)))) {
+ Buffer b = new Buffer(sig);
+
+ b.getString(); // ecdsa-sha2-nistp256
+ b.getInt();
+
+ byte[] r = b.getMPInt();
+ byte[] s = b.getMPInt();
+
+ r=insert0(r);
+ s=insert0(s);
+
+ byte[] asn1 = null;
+ if(r.length<64){
+ asn1 = new byte[6+r.length+s.length];
+ asn1[0] = (byte)0x30;
+ asn1[1] = (byte)(4+r.length+s.length);
+ asn1[2] = (byte)0x02;
+ asn1[3] = (byte)r.length;
+ System.arraycopy(r, 0, asn1, 4, r.length);
+ asn1[r.length+4] = (byte)0x02;
+ asn1[r.length+5] = (byte)s.length;
+ System.arraycopy(s, 0, asn1, (6+r.length), s.length);
+ }
+ else {
+ asn1 = new byte[6+r.length+s.length+1];
+ asn1[0] = (byte)0x30;
+ asn1[1] = (byte)0x81;
+ asn1[2] = (byte)(4+r.length+s.length);
+ asn1[3] = (byte)0x02;
+ asn1[4] = (byte)r.length;
+ System.arraycopy(r, 0, asn1, 5, r.length);
+ asn1[r.length+5] = (byte)0x02;
+ asn1[r.length+6] = (byte)s.length;
+ System.arraycopy(s, 0, asn1, (7+r.length), s.length);
+ }
+ sig=asn1;
+ }
+
+ return signature.verify(sig);
+ }
+
+ private byte[] insert0(byte[] buf){
+ if ((buf[0] & 0x80) == 0) return buf;
+ byte[] tmp = new byte[buf.length+1];
+ System.arraycopy(buf, 0, tmp, 1, buf.length);
+ bzero(buf);
+ return tmp;
+ }
+ private byte[] chop0(byte[] buf){
+ if(buf[0]!=0) return buf;
+ byte[] tmp = new byte[buf.length-1];
+ System.arraycopy(buf, 1, tmp, 0, tmp.length);
+ bzero(buf);
+ return tmp;
+ }
+
+ private void bzero(byte[] buf){
+ for(int i = 0; i