From e09de8bcb794a9cbcb5e6d60fdcbdef2f95b3756 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Thu, 25 Jun 2009 22:46:30 +0000 Subject: Add authentication agent forwarding git-svn-id: https://connectbot.googlecode.com/svn/trunk/connectbot@331 df292f66-193f-0410-a5fc-6d59da041ff2 --- .../java/com/trilead/ssh2/AuthAgentCallback.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java (limited to 'lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java') diff --git a/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java b/lib/src/main/java/com/trilead/ssh2/AuthAgentCallback.java new file mode 100644 index 0000000..2bd10e0 --- /dev/null +++ b/lib/src/main/java/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 retrieveIdentities(); + + /** + * @param key A RSAPrivateKey or DSAPrivateKey + * 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 RSAPrivateKey or DSAPrivateKey + * containing a DSA or RSA private key of + * the user in Trilead object format. + */ + Object getPrivateKey(byte[] publicKey); +} -- cgit v1.2.3