Author: joehni Date: Fri Feb 22 07:23:54 2013 New Revision: 1448916 URL: http://svn.apache.org/r1448916 Log: Reverted change 1433253 of VFS-451.
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java commons/proper/vfs/trunk/src/changes/changes.xml commons/proper/vfs/trunk/src/site/xdoc/testing.xml (props changed) Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1448916&r1=1448915&r2=1448916&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java Fri Feb 22 07:23:54 2013 @@ -85,7 +85,7 @@ public final class SftpClientFactory jsch.setIdentityRepository(repositoryFactory.create(jsch)); } - addIdentities(jsch, sshDir, identities, password); + addIdentities(jsch, sshDir, identities); Session session; try @@ -172,13 +172,13 @@ public final class SftpClientFactory return session; } - private static void addIdentities(final JSch jsch, final File sshDir, final File[] identities, char[] password) throws FileSystemException - { + private static void addIdentities(final JSch jsch, final File sshDir, final File[] identities) throws FileSystemException + { if (identities != null) { for (final File privateKeyFile : identities) { - addIndentity(jsch, privateKeyFile, password); + addIndentity(jsch, privateKeyFile); } } else @@ -187,16 +187,16 @@ public final class SftpClientFactory final File privateKeyFile = new File(sshDir, "id_rsa"); if (privateKeyFile.isFile() && privateKeyFile.canRead()) { - addIndentity(jsch, privateKeyFile, password); + addIndentity(jsch, privateKeyFile); } } } - private static void addIndentity(final JSch jsch, final File privateKeyFile, char[] password) throws FileSystemException + private static void addIndentity(final JSch jsch, final File privateKeyFile) throws FileSystemException { try { - jsch.addIdentity(privateKeyFile.getAbsolutePath(), password == null ? null : new String(password)); + jsch.addIdentity(privateKeyFile.getAbsolutePath()); } catch (final JSchException e) { Modified: commons/proper/vfs/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1448916&r1=1448915&r2=1448916&view=diff ============================================================================== --- commons/proper/vfs/trunk/src/changes/changes.xml (original) +++ commons/proper/vfs/trunk/src/changes/changes.xml Fri Feb 22 07:23:54 2013 @@ -53,9 +53,6 @@ AbstractFileObject.getChildren() may corrupt its internal state if a filename can not be resolved. </action> - <action issue="VFS-451" dev="ggregory" type="fix" due-to="ilmarcoronchi"> - [SFTP] Authentication fails using private key. - </action> <action issue="VFS-450" dev="ggregory" type="fix" due-to="dlmarion"> [HDFS] HDFSFileSystem.resolveFile() does not honor CacheStrategy.ON_RESOLVE. </action> Propchange: commons/proper/vfs/trunk/src/site/xdoc/testing.xml ('svn:mergeinfo' removed)