diff --git a/Jenkinsfile b/Jenkinsfile index 3bab72b6..337d2a5a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,7 +12,7 @@ pipeline { steps { script { m2repo = "${pwd tmp: true}/m2repo" - String jdk = "11" + String jdk = "21" List mavenOptions = [ '--update-snapshots', "-Dmaven.repo.local=$m2repo", diff --git a/test/com/trilead/ssh2/KnownHostsTest.java b/test/com/trilead/ssh2/KnownHostsTest.java index 1d0effeb..c3a4d29a 100644 --- a/test/com/trilead/ssh2/KnownHostsTest.java +++ b/test/com/trilead/ssh2/KnownHostsTest.java @@ -43,6 +43,7 @@ public void testKnownHostsPreferredAlgorithmsSshRsaOnly() throws IOException, No public void testKnownHostsPreferredAlgorithmsEcdsaOnly() throws IOException, NoSuchAlgorithmException { KnownHosts testCase = new KnownHosts(); KeyPairGenerator ecGenerator = KeyPairGenerator.getInstance("EC"); + ecGenerator.initialize(256); testCase.addHostkey(new String[]{"localhost"}, "ecdsa-sha2-nistp256", new ECDSAKeyAlgorithm.ECDSASha2Nistp256().encodePublicKey((ECPublicKey) ecGenerator.generateKeyPair().getPublic())); assertArrayEquals(new String[]{"ecdsa-sha2-nistp256", "ssh-ed25519", "ecdsa-sha2-nistp521", "ecdsa-sha2-nistp384","rsa-sha2-256", "rsa-sha2-512","ssh-rsa", "ssh-dss"}, testCase.getPreferredServerHostkeyAlgorithmOrder("localhost")); }