Class AbstractHostKeyVerification

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map allowedHosts()  
      void allowHost​(java.lang.String host, java.lang.String hostKeyFingerprint, boolean always)  
      java.util.List deniedHosts()  
      void denyHost​(java.lang.String host, boolean always)  
      void endElement​(java.lang.String uri, java.lang.String localName, java.lang.String qname)  
      boolean isHostFileWriteable()  
      abstract void onDeniedHost​(java.lang.String host)  
      abstract void onHostKeyMismatch​(java.lang.String host, java.lang.String allowedHostKey, java.lang.String actualHostKey)  
      abstract void onUnknownHost​(java.lang.String host, java.lang.String hostKeyFingerprint)  
      void removeAllowedHost​(java.lang.String host)  
      void removeDeniedHost​(java.lang.String host)  
      void saveHostFile()  
      void startElement​(java.lang.String uri, java.lang.String localName, java.lang.String qname, org.xml.sax.Attributes attrs)  
      java.lang.String toString()  
      boolean verifyHost​(java.lang.String host, SshPublicKey pk)
      Called by the transport protocol to verify the identity of the server through the supplied public key.
      • Methods inherited from class org.xml.sax.helpers.DefaultHandler

        characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • startElement

        public void startElement​(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qname,
                                 org.xml.sax.Attributes attrs)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Overrides:
        startElement in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        uri -
        localName -
        qname -
        attrs -
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String qname)
                        throws org.xml.sax.SAXException
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Overrides:
        endElement in class org.xml.sax.helpers.DefaultHandler
        Parameters:
        uri -
        localName -
        qname -
        Throws:
        org.xml.sax.SAXException
      • isHostFileWriteable

        public boolean isHostFileWriteable()
        Returns:
      • onHostKeyMismatch

        public abstract void onHostKeyMismatch​(java.lang.String host,
                                               java.lang.String allowedHostKey,
                                               java.lang.String actualHostKey)
                                        throws TransportProtocolException
        Parameters:
        host -
        allowedHostKey -
        actualHostKey -
        Throws:
        TransportProtocolException
      • allowedHosts

        public java.util.Map allowedHosts()
        Returns:
      • deniedHosts

        public java.util.List deniedHosts()
        Returns:
      • removeAllowedHost

        public void removeAllowedHost​(java.lang.String host)
        Parameters:
        host -
      • removeDeniedHost

        public void removeDeniedHost​(java.lang.String host)
        Parameters:
        host -
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        Returns: