You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/08/05 05:31:19 UTC

[camel] 02/02: camel-ftp: Fix test due to jsch upgrade

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5b28fe4128fa9417550b4a46001d5961d272debd
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sat Aug 5 07:31:07 2023 +0200

    camel-ftp: Fix test due to jsch upgrade
---
 .../component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java
index b635385aa7f..770a0e4fb5f 100644
--- a/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java
+++ b/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/sftp/integration/SftpKeyPairECConsumeIT.java
@@ -20,6 +20,7 @@ import java.io.ByteArrayOutputStream;
 import java.security.KeyPair;
 import java.security.KeyPairGenerator;
 
+import com.jcraft.jsch.JSch;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -84,7 +85,7 @@ public class SftpKeyPairECConsumeIT extends SftpServerTestSupport {
         //   83:d=1  hl=3 l= 137 cons:  cont [ 1 ]
         //   86:d=2  hl=3 l= 134 prim:   BIT STRING
         // and a key with "-----BEGIN EC PRIVATE KEY-----"
-        com.jcraft.jsch.KeyPair kp = com.jcraft.jsch.KeyPair.genKeyPair(null, com.jcraft.jsch.KeyPair.ECDSA, 521);
+        com.jcraft.jsch.KeyPair kp = com.jcraft.jsch.KeyPair.genKeyPair(new JSch(), com.jcraft.jsch.KeyPair.ECDSA, 521);
         kp.writePrivateKey(PRIVATE_KEY);
     }