Skip to content

Commit

Permalink
chore: test and compile with Java 21 (#161)
Browse files Browse the repository at this point in the history
* chore: use Java 17

* Update Jenkinsfile

* test: use Java 17

* Update Jenkinsfile

* fix: set key size
  • Loading branch information
kuisathaverat authored Jan 19, 2024
1 parent 4cddbc4 commit 8a5d0bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
steps {
script {
m2repo = "${pwd tmp: true}/m2repo"
String jdk = "11"
String jdk = "21"
List<String> mavenOptions = [
'--update-snapshots',
"-Dmaven.repo.local=$m2repo",
Expand Down
1 change: 1 addition & 0 deletions test/com/trilead/ssh2/KnownHostsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand Down

0 comments on commit 8a5d0bf

Please sign in to comment.