Class ExtendedServerHostKeyVerifier

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void addServerHostKey​(java.lang.String hostname, int port, java.lang.String keyAlgorithm, byte[] serverHostKey)
      After authentication, if the server indicates it has another keyAlgorithm, this method will be called for the app to add it to its record of known keys for this hostname.
      abstract java.util.List<java.lang.String> getKnownKeyAlgorithmsForHost​(java.lang.String hostname, int port)
      Called during connection to determine which keys are known for this host.
      abstract void removeServerHostKey​(java.lang.String hostname, int port, java.lang.String serverHostKeyAlgorithm, byte[] serverHostKey)
      After authentication, if the server indicates it no longer uses this key, this method will be called for the app to remove its record of it.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExtendedServerHostKeyVerifier

        public ExtendedServerHostKeyVerifier()
    • Method Detail

      • getKnownKeyAlgorithmsForHost

        public abstract java.util.List<java.lang.String> getKnownKeyAlgorithmsForHost​(java.lang.String hostname,
                                                                                      int port)
        Called during connection to determine which keys are known for this host.
        Parameters:
        hostname - the hostname used to create the Connection object
        port - the server's remote TCP port
        Returns:
        list of hostkey algorithms for the given hostname and port combination or null if none are known.
      • removeServerHostKey

        public abstract void removeServerHostKey​(java.lang.String hostname,
                                                 int port,
                                                 java.lang.String serverHostKeyAlgorithm,
                                                 byte[] serverHostKey)
        After authentication, if the server indicates it no longer uses this key, this method will be called for the app to remove its record of it.
        Parameters:
        hostname - the hostname used to create the Connection object
        port - the server's remote TCP port
        serverHostKeyAlgorithm - key algorithm of removed key
        serverHostKey - key data of removed key
      • addServerHostKey

        public abstract void addServerHostKey​(java.lang.String hostname,
                                              int port,
                                              java.lang.String keyAlgorithm,
                                              byte[] serverHostKey)
        After authentication, if the server indicates it has another keyAlgorithm, this method will be called for the app to add it to its record of known keys for this hostname.
        Parameters:
        hostname - the hostname used to create the Connection object
        port - the server's remote TCP port
        keyAlgorithm - SSH standard name for the key to be added
        serverHostKey - SSH encoding of the key data for the key to be added