org.apache.sshd.agent
Class AgentLocal

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

public class AgentLocal
extends java.lang.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(java.security.KeyPair key, java.lang.String comment)
           
protected static boolean areKeyEquals(java.security.PublicKey k1, java.security.PublicKey k2)
           
 void close()
           
 java.util.List<SshAgent.Pair<java.security.PublicKey,java.lang.String>> getIdentities()
           
protected static SshAgent.Pair<java.security.KeyPair,java.lang.String> getKeyPair(java.util.List<SshAgent.Pair<java.security.KeyPair,java.lang.String>> keys, java.security.PublicKey key)
           
 void removeAllIdentities()
           
 void removeIdentity(java.security.PublicKey key)
           
 byte[] sign(java.security.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 java.util.List<SshAgent.Pair<java.security.PublicKey,java.lang.String>> getIdentities()
                                                                                      throws java.io.IOException
Specified by:
getIdentities in interface SshAgent
Throws:
java.io.IOException

sign

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

addIdentity

public void addIdentity(java.security.KeyPair key,
                        java.lang.String comment)
                 throws java.io.IOException
Specified by:
addIdentity in interface SshAgent
Throws:
java.io.IOException

removeIdentity

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

removeAllIdentities

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

close

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

getKeyPair

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

areKeyEquals

protected static boolean areKeyEquals(java.security.PublicKey k1,
                                      java.security.PublicKey k2)


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.