Skip to content

Commit 7c3516a

Browse files
authored
Merge pull request jenkinsci#105 from offa/keyutils
Use KeyUtils.RSA_ALGORITHM
2 parents 96d7646 + 6af2275 commit 7c3516a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/java/com/cloudbees/jenkins/plugins/sshagent/SSHAgentBase.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import java.security.interfaces.RSAPublicKey;
1717
import java.util.concurrent.atomic.AtomicInteger;
1818
import java.util.logging.Logger;
19+
20+
import org.apache.sshd.common.config.keys.KeyUtils;
1921
import org.apache.sshd.server.channel.ChannelSession;
2022
import org.apache.sshd.server.command.Command;
2123
import org.apache.sshd.server.Environment;
@@ -74,7 +76,7 @@ protected void startMockSSHServer() throws Exception {
7476
sshd.setPort(getValidPort());
7577
sshd.setHost(SSH_SERVER_HOST);
7678
SimpleGeneratorHostKeyProvider hostKeyProvider = new SimpleGeneratorHostKeyProvider(Paths.get(hostKey.getPath()));
77-
hostKeyProvider.setAlgorithm(/* TODO when upgrading sshd: KeyUtils.RSA_ALGORITHM */"RSA"); // http://stackoverflow.com/a/33692432/12916
79+
hostKeyProvider.setAlgorithm(KeyUtils.RSA_ALGORITHM);
7880
sshd.setKeyPairProvider(hostKeyProvider);
7981
sshd.setShellFactory(new ShellFactory() {
8082
@Override

0 commit comments

Comments
 (0)