Class OpenSSHKnownHosts.HostEntry
- java.lang.Object
-
- net.schmizz.sshj.transport.verification.OpenSSHKnownHosts.HostEntry
-
- All Implemented Interfaces:
OpenSSHKnownHosts.KnownHostEntry
- Enclosing class:
- OpenSSHKnownHosts
public static class OpenSSHKnownHosts.HostEntry extends java.lang.Object implements OpenSSHKnownHosts.KnownHostEntry
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
comment
private java.lang.String
hostPart
protected java.security.PublicKey
key
protected org.slf4j.Logger
log
(package private) OpenSSHKnownHosts.Marker
marker
private KnownHostMatchers.HostMatcher
matcher
protected KeyType
type
-
Constructor Summary
Constructors Constructor Description HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key)
HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key, java.lang.String comment)
HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key, java.lang.String comment, LoggerFactory loggerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
appliesTo(java.lang.String host)
boolean
appliesTo(KeyType type, java.lang.String host)
java.lang.String
getComment()
java.lang.String
getFingerprint()
protected java.lang.String
getHostPart()
private java.lang.String
getKeyString(java.security.PublicKey pk)
java.lang.String
getLine()
KeyType
getType()
boolean
verify(java.security.PublicKey key)
-
-
-
Field Detail
-
marker
final OpenSSHKnownHosts.Marker marker
-
hostPart
private final java.lang.String hostPart
-
type
protected final KeyType type
-
key
protected final java.security.PublicKey key
-
comment
private final java.lang.String comment
-
matcher
private final KnownHostMatchers.HostMatcher matcher
-
log
protected final org.slf4j.Logger log
-
-
Constructor Detail
-
HostEntry
public HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key) throws SSHException
- Throws:
SSHException
-
HostEntry
public HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key, java.lang.String comment) throws SSHException
- Throws:
SSHException
-
HostEntry
public HostEntry(OpenSSHKnownHosts.Marker marker, java.lang.String hostPart, KeyType type, java.security.PublicKey key, java.lang.String comment, LoggerFactory loggerFactory) throws SSHException
- Throws:
SSHException
-
-
Method Detail
-
getType
public KeyType getType()
- Specified by:
getType
in interfaceOpenSSHKnownHosts.KnownHostEntry
-
getFingerprint
public java.lang.String getFingerprint()
- Specified by:
getFingerprint
in interfaceOpenSSHKnownHosts.KnownHostEntry
-
appliesTo
public boolean appliesTo(java.lang.String host) throws java.io.IOException
- Specified by:
appliesTo
in interfaceOpenSSHKnownHosts.KnownHostEntry
- Throws:
java.io.IOException
-
appliesTo
public boolean appliesTo(KeyType type, java.lang.String host) throws java.io.IOException
- Specified by:
appliesTo
in interfaceOpenSSHKnownHosts.KnownHostEntry
- Throws:
java.io.IOException
-
verify
public boolean verify(java.security.PublicKey key) throws java.io.IOException
- Specified by:
verify
in interfaceOpenSSHKnownHosts.KnownHostEntry
- Throws:
java.io.IOException
-
getLine
public java.lang.String getLine()
- Specified by:
getLine
in interfaceOpenSSHKnownHosts.KnownHostEntry
-
getKeyString
private java.lang.String getKeyString(java.security.PublicKey pk)
-
getHostPart
protected java.lang.String getHostPart()
-
getComment
public java.lang.String getComment()
-
-