mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject [2/3] git commit: Use agent key pairs before the ones from the KeyPairProvider
Date Fri, 07 Feb 2014 22:54:17 GMT
Use agent key pairs before the ones from the KeyPairProvider

Project: http://git-wip-us.apache.org/repos/asf/mina-sshd/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina-sshd/commit/e0cbc8b2
Tree: http://git-wip-us.apache.org/repos/asf/mina-sshd/tree/e0cbc8b2
Diff: http://git-wip-us.apache.org/repos/asf/mina-sshd/diff/e0cbc8b2

Branch: refs/heads/master
Commit: e0cbc8b2b08c5f5fb1f6acaa83397e6c9a0415e1
Parents: 602ed3f
Author: Guillaume Nodet <gnodet@apache.org>
Authored: Fri Feb 7 23:53:03 2014 +0100
Committer: Guillaume Nodet <gnodet@apache.org>
Committed: Fri Feb 7 23:53:03 2014 +0100

----------------------------------------------------------------------
 .../org/apache/sshd/client/auth/UserAuthPublicKey.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina-sshd/blob/e0cbc8b2/sshd-core/src/main/java/org/apache/sshd/client/auth/UserAuthPublicKey.java
----------------------------------------------------------------------
diff --git a/sshd-core/src/main/java/org/apache/sshd/client/auth/UserAuthPublicKey.java b/sshd-core/src/main/java/org/apache/sshd/client/auth/UserAuthPublicKey.java
index 7dfe20b..6fdba21 100644
--- a/sshd-core/src/main/java/org/apache/sshd/client/auth/UserAuthPublicKey.java
+++ b/sshd-core/src/main/java/org/apache/sshd/client/auth/UserAuthPublicKey.java
@@ -73,12 +73,6 @@ public class UserAuthPublicKey implements UserAuth {
                 ids.add(new KeyPairIdentity(session.getFactoryManager(), (KeyPair) o));
             }
         }
-        KeyPairProvider provider = session.getFactoryManager().getKeyPairProvider();
-        if (provider != null) {
-            for (KeyPair pair : provider.loadKeys()) {
-                ids.add(new KeyPairIdentity(session.getFactoryManager(), pair));
-            }
-        }
         SshAgentFactory factory = session.getFactoryManager().getAgentFactory();
         if (factory != null) {
             this.agent = factory.createClient(session.getFactoryManager());
@@ -88,6 +82,12 @@ public class UserAuthPublicKey implements UserAuth {
         } else {
             this.agent = null;
         }
+        KeyPairProvider provider = session.getFactoryManager().getKeyPairProvider();
+        if (provider != null) {
+            for (KeyPair pair : provider.loadKeys()) {
+                ids.add(new KeyPairIdentity(session.getFactoryManager(), pair));
+            }
+        }
         this.keys = ids.iterator();
     }
 


Mime
View raw message