X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=netconf%2Fnetconf-ssh%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fnetconf%2Fssh%2Fauthentication%2FSSHServerTest.java;h=1d31f6b77a8064ad57da00bbf143ae7d35fc7c29;hb=b24bfe9d975f60b2afcbef08787024bc61e82dfb;hp=7af4598997cc6254906f387fa7d809f8c0092ee0;hpb=c8b97d445cc89c61fe0412241229b08324894e99;p=netconf.git diff --git a/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/ssh/authentication/SSHServerTest.java b/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/ssh/authentication/SSHServerTest.java index 7af4598997..1d31f6b77a 100644 --- a/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/ssh/authentication/SSHServerTest.java +++ b/netconf/netconf-ssh/src/test/java/org/opendaylight/netconf/ssh/authentication/SSHServerTest.java @@ -30,7 +30,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.opendaylight.netconf.auth.AuthProvider; import org.opendaylight.netconf.ssh.SshProxyServer; import org.opendaylight.netconf.ssh.SshProxyServerConfigurationBuilder; import org.opendaylight.netconf.util.osgi.NetconfConfiguration; @@ -74,13 +73,9 @@ public class SSHServerTest { server = new SshProxyServer(minaTimerEx, clientGroup, nioExec); server.bind(new SshProxyServerConfigurationBuilder() .setBindingAddress(addr).setLocalAddress(NetconfConfiguration.NETCONF_LOCAL_ADDRESS) - .setAuthenticator(new AuthProvider() { - @Override - public boolean authenticated(final String username, final String password) { - return true; - } - }) - .setKeyPairProvider(new PEMGeneratorHostKeyProvider(sshKeyPair.toPath().toAbsolutePath().toString())) + .setAuthenticator((username, password) -> true) + .setKeyPairProvider(new PEMGeneratorHostKeyProvider(sshKeyPair.toPath().toAbsolutePath().toString(), + "RSA", 4096)) .setIdleTimeout(Integer.MAX_VALUE).createSshProxyServerConfiguration()); LOG.info("SSH server started on {}", PORT); }