aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/trilead/ssh2/AuthAgentCallback.java
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-06-25 22:46:30 +0000
committerKenny Root <kenny@the-b.org>2009-06-25 22:46:30 +0000
commit12c1e528b5c5dc325d2b3887104f0cf277b83d0b (patch)
tree64d509ba6704f4d6937b48e248d106d8378c33e5 /src/com/trilead/ssh2/AuthAgentCallback.java
parent93d7a03dc05cb6bc230fff3b1d0b124263f00320 (diff)
downloadconnectbot-12c1e528b5c5dc325d2b3887104f0cf277b83d0b.tar.gz
connectbot-12c1e528b5c5dc325d2b3887104f0cf277b83d0b.tar.bz2
connectbot-12c1e528b5c5dc325d2b3887104f0cf277b83d0b.zip
Add authentication agent forwarding
git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@331 df292f66-193f-0410-a5fc-6d59da041ff2
Diffstat (limited to 'src/com/trilead/ssh2/AuthAgentCallback.java')
-rw-r--r--src/com/trilead/ssh2/AuthAgentCallback.java45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/com/trilead/ssh2/AuthAgentCallback.java b/src/com/trilead/ssh2/AuthAgentCallback.java
new file mode 100644
index 0000000..2bd10e0
--- /dev/null
+++ b/src/com/trilead/ssh2/AuthAgentCallback.java
@@ -0,0 +1,45 @@
+package com.trilead.ssh2;
+
+import java.util.Map;
+
+/**
+ * AuthAgentCallback.
+ *
+ * @author Kenny Root
+ * @version $Id$
+ */
+public interface AuthAgentCallback {
+
+ /**
+ * @return array of blobs containing the OpenSSH-format encoded public keys
+ */
+ Map<String,byte[]> retrieveIdentities();
+
+ /**
+ * @param key A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code>
+ * containing a DSA or RSA private key of
+ * the user in Trilead object format.
+ * @param comment comment associated with this key
+ * @return success or failure
+ */
+ boolean addIdentity(Object key, String comment);
+
+ /**
+ * @param publicKey byte blob containing the OpenSSH-format encoded public key
+ * @return success or failure
+ */
+ boolean removeIdentity(byte[] publicKey);
+
+ /**
+ * @return success or failure
+ */
+ boolean removeAllIdentities();
+
+ /**
+ * @param publicKey byte blob containing the OpenSSH-format encoded public key
+ * @return A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code>
+ * containing a DSA or RSA private key of
+ * the user in Trilead object format.
+ */
+ Object getPrivateKey(byte[] publicKey);
+}