comparison src/com/trilead/ssh2/AuthAgentCallback.java @ 0:0ce5cc452d02

initial version
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 10:41:19 -0700
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:0ce5cc452d02
1 package com.trilead.ssh2;
2
3 import java.security.KeyPair;
4 import java.util.Map;
5
6 /**
7 * AuthAgentCallback.
8 *
9 * @author Kenny Root
10 * @version $Id$
11 */
12 public interface AuthAgentCallback {
13
14 /**
15 * @return array of blobs containing the OpenSSH-format encoded public keys
16 */
17 Map<String, byte[]> retrieveIdentities();
18
19 /**
20 * @param key A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code>
21 * containing a DSA or RSA private key of
22 * the user in Trilead object format.
23 * @param comment comment associated with this key
24 * @param confirmUse whether to prompt before using this key
25 * @param lifetime lifetime in seconds for key to be remembered
26 * @return success or failure
27 */
28 boolean addIdentity(KeyPair pair, String comment, boolean confirmUse, int lifetime);
29
30 /**
31 * @param publicKey byte blob containing the OpenSSH-format encoded public key
32 * @return success or failure
33 */
34 boolean removeIdentity(byte[] publicKey);
35
36 /**
37 * @return success or failure
38 */
39 boolean removeAllIdentities();
40
41 /**
42 * @param publicKey byte blob containing the OpenSSH-format encoded public key
43 * @return A <code>RSAPrivateKey</code> or <code>DSAPrivateKey</code>
44 * containing a DSA or RSA private key of
45 * the user in Trilead object format.
46 */
47 KeyPair getKeyPair(byte[] publicKey);
48
49 /**
50 * @return
51 */
52 boolean isAgentLocked();
53
54 /**
55 * @param lockPassphrase
56 */
57 boolean setAgentLock(String lockPassphrase);
58
59 /**
60 * @param unlockPassphrase
61 * @return
62 */
63 boolean requestAgentUnlock(String unlockPassphrase);
64 }