Skip to content

Commit

Permalink
Merge pull request #368 from norrisjeremy/20230801
Browse files Browse the repository at this point in the history
0.2.11 changes
  • Loading branch information
mwiede authored Aug 1, 2023
2 parents 0b15aef + 6d7508e commit 9cc9f65
Show file tree
Hide file tree
Showing 18 changed files with 201 additions and 18 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* [0.2.11](https://github.com/mwiede/jsch/releases/tag/jsch-0.2.11)
* [#369](https://github.com/mwiede/jsch/issues/369) fix multi-line PEM key parsing to work with windows line endings due to regression from previous fix for [#362](https://github.com/mwiede/jsch/issues/362).
* [0.2.10](https://github.com/mwiede/jsch/releases/tag/jsch-0.2.10)
* Fix new Java 21 compiler warning: `possible 'this' escape before subclass is fully initialized`.
* Tweak OSGi bundle manifest to allow Log4j 3.
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.75</version>
<version>1.76</version>
<optional>true</optional>
</dependency>
<dependency>
Expand Down Expand Up @@ -405,7 +405,7 @@
<Import-Package><![CDATA[
com.sun.jna*;version="${range;[=0,+)}",
org.apache.logging.log4j*;version="${range;[=0,4)}",
org.bouncycastle*;version="[1.69,${versionmask;+})",
org.bouncycastle*;version="[1.76,${versionmask;+})",
org.slf4j*;version="[1.7,${versionmask;+})",
org.ietf.jgss;resolution:=optional,
*
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/jcraft/jsch/KeyPair.java
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ static KeyPair load(JSch.InstanceLogger instLogger, byte[] prvkey, byte[] pubkey

start = 0;
i = 0;
int xds = 0;
boolean xds = false;

int _len = _buf.length;
while (i < _len) {
Expand All @@ -901,7 +901,7 @@ static KeyPair load(JSch.InstanceLogger instLogger, byte[] prvkey, byte[] pubkey
System.arraycopy(_buf, i + 1, _buf, i - (xd ? 1 : 0), _len - (i + 1));
if (xd) {
_len--;
xds++;
xds = true;
}
_len--;
continue;
Expand All @@ -912,8 +912,8 @@ static KeyPair load(JSch.InstanceLogger instLogger, byte[] prvkey, byte[] pubkey
i++;
}

if (i - xds - start > 0)
data = Util.fromBase64(_buf, start, i - xds - start);
if (i - (xds ? 1 : 0) - start > 0)
data = Util.fromBase64(_buf, start, i - (xds ? 1 : 0) - start);

Util.bzero(_buf);
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/jcraft/jsch/bc/CAST128CBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@

import com.jcraft.jsch.Cipher;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.DefaultBufferedBlockCipher;
import org.bouncycastle.crypto.engines.CAST5Engine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.params.*;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;

public class CAST128CBC implements Cipher {
private static final int ivsize = 8;
Expand Down Expand Up @@ -64,7 +66,7 @@ public void init(int mode, byte[] key, byte[] iv) throws Exception {
try {
ParametersWithIV keyspec =
new ParametersWithIV(new KeyParameter(key, 0, key.length), iv, 0, iv.length);
cipher = new BufferedBlockCipher(new CBCBlockCipher(new CAST5Engine()));
cipher = new DefaultBufferedBlockCipher(CBCBlockCipher.newInstance(new CAST5Engine()));
cipher.init(mode == ENCRYPT_MODE, keyspec);
} catch (Exception e) {
cipher = null;
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/jcraft/jsch/bc/CAST128CTR.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@

import com.jcraft.jsch.Cipher;
import org.bouncycastle.crypto.engines.CAST5Engine;
import org.bouncycastle.crypto.modes.CTRModeCipher;
import org.bouncycastle.crypto.modes.SICBlockCipher;
import org.bouncycastle.crypto.params.*;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;

public class CAST128CTR implements Cipher {
private static final int ivsize = 8;
private static final int bsize = 16;
private SICBlockCipher cipher;
private CTRModeCipher cipher;

@Override
public int getIVSize() {
Expand Down Expand Up @@ -63,7 +65,7 @@ public void init(int mode, byte[] key, byte[] iv) throws Exception {
try {
ParametersWithIV keyspec =
new ParametersWithIV(new KeyParameter(key, 0, key.length), iv, 0, iv.length);
cipher = new SICBlockCipher(new CAST5Engine());
cipher = SICBlockCipher.newInstance(new CAST5Engine());
cipher.init(mode == ENCRYPT_MODE, keyspec);
} catch (Exception e) {
cipher = null;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/jcraft/jsch/bc/SEEDCBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@

import com.jcraft.jsch.Cipher;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.DefaultBufferedBlockCipher;
import org.bouncycastle.crypto.engines.SEEDEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.params.*;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;

public class SEEDCBC implements Cipher {
private static final int ivsize = 16;
Expand Down Expand Up @@ -64,7 +66,7 @@ public void init(int mode, byte[] key, byte[] iv) throws Exception {
try {
ParametersWithIV keyspec =
new ParametersWithIV(new KeyParameter(key, 0, key.length), iv, 0, iv.length);
cipher = new BufferedBlockCipher(new CBCBlockCipher(new SEEDEngine()));
cipher = new DefaultBufferedBlockCipher(CBCBlockCipher.newInstance(new SEEDEngine()));
cipher.init(mode == ENCRYPT_MODE, keyspec);
} catch (Exception e) {
cipher = null;
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/jcraft/jsch/bc/TwofishCBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@

import com.jcraft.jsch.Cipher;
import org.bouncycastle.crypto.BufferedBlockCipher;
import org.bouncycastle.crypto.DefaultBufferedBlockCipher;
import org.bouncycastle.crypto.engines.TwofishEngine;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.params.*;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;

abstract class TwofishCBC implements Cipher {
private static final int ivsize = 16;
Expand Down Expand Up @@ -59,7 +61,7 @@ public void init(int mode, byte[] key, byte[] iv) throws Exception {
try {
ParametersWithIV keyspec =
new ParametersWithIV(new KeyParameter(key, 0, key.length), iv, 0, iv.length);
cipher = new BufferedBlockCipher(new CBCBlockCipher(new TwofishEngine()));
cipher = new DefaultBufferedBlockCipher(CBCBlockCipher.newInstance(new TwofishEngine()));
cipher.init(mode == ENCRYPT_MODE, keyspec);
} catch (Exception e) {
cipher = null;
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/jcraft/jsch/bc/TwofishCTR.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@

import com.jcraft.jsch.Cipher;
import org.bouncycastle.crypto.engines.TwofishEngine;
import org.bouncycastle.crypto.modes.CTRModeCipher;
import org.bouncycastle.crypto.modes.SICBlockCipher;
import org.bouncycastle.crypto.params.*;
import org.bouncycastle.crypto.params.KeyParameter;
import org.bouncycastle.crypto.params.ParametersWithIV;

abstract class TwofishCTR implements Cipher {
private static final int ivsize = 16;
private SICBlockCipher cipher;
private CTRModeCipher cipher;

@Override
public int getIVSize() {
Expand All @@ -58,7 +60,7 @@ public void init(int mode, byte[] key, byte[] iv) throws Exception {
try {
ParametersWithIV keyspec =
new ParametersWithIV(new KeyParameter(key, 0, key.length), iv, 0, iv.length);
cipher = new SICBlockCipher(new TwofishEngine());
cipher = SICBlockCipher.newInstance(new TwofishEngine());
cipher.init(mode == ENCRYPT_MODE, keyspec);
} catch (Exception e) {
cipher = null;
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/jcraft/jsch/KeyPairTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ static Stream<Arguments> keyArgs() {
Arguments.of("encrypted_openssh_private_key_dsa", "secret123", "ssh-dss"),
// unencrypted RSA with windows (\r\n) line endings
Arguments.of("issue362_rsa", null, "ssh-rsa"),
Arguments.of("issue_369_rsa_opensshv1", null, "ssh-rsa"),
Arguments.of("issue_369_rsa_pem", null, "ssh-rsa"),
Arguments.of("encrypted_issue_369_rsa_opensshv1", "secret123", "ssh-rsa"),
Arguments.of("encrypted_issue_369_rsa_pem", "secret123", "ssh-rsa"),
// ecdsa EC private key format
Arguments.of("docker/id_ecdsa256", null, "ecdsa-sha2-nistp256"), //
Arguments.of("docker/id_ecdsa384", null, "ecdsa-sha2-nistp384"), //
Expand Down
4 changes: 4 additions & 0 deletions src/test/resources/docker/authorized_keys.KeyPairIT
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ ssh-dss AAAAB3NzaC1kc3MAAACBAKCQzxCEIM7yb5fbSmuJCz/+v40WEbULx4JKCXBb7zmRtDtweBqU
ssh-dss AAAAB3NzaC1kc3MAAACBAMKmaZwslPWE83wv+Ofl9oaMeOR03Yk0cyDc5fSAgjepXZQR5sps0KFORRufI6dLQHY4XLoyPc/Hr0ra+vY/l+p20cJVjQ07oosPU/d2eLdZ66rdjXCyrJPjFjnNJtumnBnJZqWGObKspnWk73vPOflReyGpUFe51PF1usur3uDLAAAAFQC3dSlxZZVNbvqjJpg8/oSMuG27/QAAAIEApkd3miYVc/Cl1QwdqwInIjby1yGNCfFsZALGBYc67lkd5lGBdNlL+fgi+BwC6UXu5OAqWB/b9OtvJR8NRcM77V252IER4t95t2ZdG66M1T5q1aOVL/ehPZFHf0oPXHJLcsybzqKFAtQj5hEbnrwJYW0fWi87C9LApplzPTVYQikAAACAUEu5tFmImzyQsUBMN/j1GWCCSVznjfRHkeGwx5koC0D2iK3mMphnF9avsoX2PrboEbGqy69JPCekKQiPPWxcQRTRqFS/ySkECJ5lJ2zJrW1whjLQEJbOq7WmusSML9U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KurggVDf2Y1vs= test
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBBcLHSACx0yr1S902vlRRnXA12YpaXIOkZUXoNFb01+CxQBgGpVTEVMuakLpIW/XcD9ltu+c6Czk5WnBKEoHNuI= test
ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBPKyvhX/3Q32EEhZKF6s+fEzfQwabsSpXgFJ2LwpGxKFxzE2jw4Nvwe9W3YbPyrZU6K2MMA7p7ZdJwdDP/tQ9dhttOGGSkea9Cq4dcdgC9cdBuQ4aGb8crmY3Z5wc1dPxQ== test
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAG3XTlAFoQd4iIBt5KoTHJk46v1AdZSd+wfCSpc2/GCzHNGVqidrKCrypszpkQOW6vYG8riilyfF36rJa9ipjR+5gDApLIe/ix1Fknr8MU6nWoYv2+NBTsEcaS/VTeiUuMKftMtlO2wOaWFcbZBQUAlb3LDnpMyYKCqIXhhl4vqCxBukg== test
Expand Down
39 changes: 39 additions & 0 deletions src/test/resources/encrypted_issue_369_rsa_opensshv1
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAACmFlczI1Ni1jdHIAAAAGYmNyeXB0AAAAGAAAABCd+5LZfU
vM8no5y5XUnD99AAAAEAAAAAEAAAGXAAAAB3NzaC1yc2EAAAADAQABAAABgQC96PvllVEO
gtQdHnaoga3gi8md+/lUwBG0SOv4co9QaJ2kvJZDTiSLmJc4euEuciiplvzKpKSWSVqaZL
boXiVVt8MnPmIwIlp8bhIqJ+0431FNWWq6RA/4EszHiARxMIwUqw+svN2GMm5fGr+PK3FR
6mXGjiVlv4/5Vb0BCUjgB0vIqq123DmKpxrT6S3Ik5vYCCn0zKtuW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zA3S680z93Pt17M11tfMXgYpN7z34DCzdj5COdwo7Ei9Et3dxdv/Nzj83kxh
KmpEq3lxqRzHG2mb2h1zHQW3RR0=
-----END OPENSSH PRIVATE KEY-----
1 change: 1 addition & 0 deletions src/test/resources/encrypted_issue_369_rsa_opensshv1.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC96PvllVEOgtQdHnaoga3gi8md+/lUwBG0SOv4co9QaJ2kvJZDTiSLmJc4euEuciiplvzKpKSWSVqaZLboXiVVt8MnPmIwIlp8bhIqJ+0431FNWWq6RA/4EszHiARxMIwUqw+svN2GMm5fGr+PK3FR6mXGjiVlv4/5Vb0BCUjgB0vIqq123DmKpxrT6S3Ik5vYCCn0zKtuWxfxp3hpCqC2TdqD7/rFTX/AstmlhTO4FRDEK/7JNBSWY8+9/rQS/c/HSSW7qMGEoGFkELKSYFSdwLcyAMS1HySzNR1SuyBLDsOSaN5iWm5cBqKIK175Uc3Xe3fIn6+C5ld0m/nN75bw6QJiDH7I2jMYDTBpDqztBiqdjcSwvNTogGQg/oJLC7aAz+E5gfkTsg/Q6bPf6quyPIQ+KKH5v2YVFQIw2Te0X7/OZACsqUnCbGiDXCixPTTGoRypcR0MQDJxR497y7zvO4kiqQpsdBoELuhWSW8+9BcovL4/jSyqUEGvGYoh/QM= test
42 changes: 42 additions & 0 deletions src/test/resources/encrypted_issue_369_rsa_pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-128-CBC,D5AFEF41BADEB0A6ADDCC294C4C34402

BgIiIqe5ABrapndv+KDz2EoUj/QWtEJ81cCVLBJT05GTA93ZPYmwFOOHzwDtZN2n
36qqSkiytcPcF4onogR50qziz/k3cN38Eiiqyrm1kOrIkxaCUogy0I2vQvDSYr8v
CuW7btHpHpv8TlbWWNO2OGawH3ZYplNZoU8lPkHrGd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W5SOU2i
t2qluYBIdfEdvB/LWOgJt0YDQUtk0ed7RCQqauBKDPWLvZ+Q8j4DOdZgW8makCS1
-----END RSA PRIVATE KEY-----
1 change: 1 addition & 0 deletions src/test/resources/encrypted_issue_369_rsa_pem.pub
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCqGObM6DyGcra+/eBdm7mIvnLM9oUDUwpT3hRbF7S7V6bb64EuFlduGXJKK+i4/a/ls1Sm3GVwnWvwuRxrVXgv1497MYDzDcflfm+bQLUN38qNscVhn3jdtFuCTIc7VKmtEd9zn4HVzQhUYWq/oiqwOsDeP1QidWbNwgBthCxzhfdi9XUpdpT3Tm/mtLwEz8KZ2kP9VdfXBql6NI64COcI+B2nzE2YwxZsLGFj1orstRZ3WOLTJdLtQ1NhBQqTEwFD06Jhf50wo13xV84jWeZom+ylJQcj9njnfH8Kf7T+1eyBAqCPLvS6kM5Q9J6bGPj67Hkp96zPT/y3Gh1le80o3JrYjo20NqWzO+/OIXilrDoYdUKJbgoM7GXtMlxFNEnj7BIf6TLNZJY9bA6dw1yFs9wOl9LRhC1zUC6kESx8DIiqSpxrZTF0ScgvC/gKqX6K81ovJBklrAuTQpTqGKOW2eY5jqiRAVa7Gx8sPPtHkGqodD/sFOKurggVDf2Y1vs= test
Loading

0 comments on commit 9cc9f65

Please sign in to comment.