org.apache.sshd.agent
Class AgentLocal

java.lang.Object
  extended by org.apache.sshd.agent.AgentLocal
All Implemented Interfaces:
SshAgent

public class AgentLocal
extends Object
implements SshAgent

A local SSH agent implementation


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.sshd.agent.SshAgent
SshAgent.Pair<U,V>
 
Field Summary
 
Fields inherited from interface org.apache.sshd.agent.SshAgent
SSH_AUTHSOCKET_ENV_NAME
 
Constructor Summary
AgentLocal()
           
 
Method Summary
 void addIdentity(KeyPair key, String comment)
           
protected static boolean areKeyEquals(PublicKey k1, PublicKey k2)
           
 void close()
           
 List<SshAgent.Pair<PublicKey,String>> getIdentities()
           
protected static SshAgent.Pair<KeyPair,String> getKeyPair(List<SshAgent.Pair<KeyPair,String>> keys, PublicKey key)
           
 void removeAllIdentities()
           
 void removeIdentity(PublicKey key)
           
 byte[] sign(PublicKey key, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentLocal

public AgentLocal()
Method Detail

getIdentities

public List<SshAgent.Pair<PublicKey,String>> getIdentities()
                                                    throws IOException
Specified by:
getIdentities in interface SshAgent
Throws:
IOException

sign

public byte[] sign(PublicKey key,
                   byte[] data)
            throws IOException
Specified by:
sign in interface SshAgent
Throws:
IOException

addIdentity

public void addIdentity(KeyPair key,
                        String comment)
                 throws IOException
Specified by:
addIdentity in interface SshAgent
Throws:
IOException

removeIdentity

public void removeIdentity(PublicKey key)
                    throws IOException
Specified by:
removeIdentity in interface SshAgent
Throws:
IOException

removeAllIdentities

public void removeAllIdentities()
                         throws IOException
Specified by:
removeAllIdentities in interface SshAgent
Throws:
IOException

close

public void close()
Specified by:
close in interface SshAgent

getKeyPair

protected static SshAgent.Pair<KeyPair,String> getKeyPair(List<SshAgent.Pair<KeyPair,String>> keys,
                                                          PublicKey key)

areKeyEquals

protected static boolean areKeyEquals(PublicKey k1,
                                      PublicKey k2)


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.