Class AbstractAgentProxy

    • Method Detail

      • getChannelType

        public java.lang.String getChannelType()
      • setChannelType

        public void setChannelType​(java.lang.String channelType)
      • getIdentities

        public java.lang.Iterable<? extends java.util.Map.Entry<java.security.PublicKey,​java.lang.String>> getIdentities()
                                                                                                                        throws java.io.IOException
        Specified by:
        getIdentities in interface SshAgent
        Throws:
        java.io.IOException
      • sign

        public java.util.Map.Entry<java.lang.String,​byte[]> sign​(SessionContext session,
                                                                       java.security.PublicKey key,
                                                                       java.lang.String algo,
                                                                       byte[] data)
                                                                throws java.io.IOException
        Specified by:
        sign in interface SshAgent
        Parameters:
        session - The current SessionContext
        key - The PublicKey to use for signing
        algo - Recommended signature algorithm - if null/empty then one will be selected based on the key type and/or signature factories. Note: even if specific algorithm specified, the implementation may disregard and choose another
        data - Data to sign
        Returns:
        used algorithm + signed data - using the identity
        Throws:
        java.io.IOException - If failed to sign
      • addIdentity

        public void addIdentity​(java.security.KeyPair kp,
                                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()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.nio.channels.Channel
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • createBuffer

        protected Buffer createBuffer​(byte cmd)
      • createBuffer

        protected Buffer createBuffer​(byte cmd,
                                      int extraLen)
      • request

        protected abstract Buffer request​(Buffer buffer)
                                   throws java.io.IOException
        Throws:
        java.io.IOException