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.Stringcommentprivate java.lang.StringhostPartprotected java.security.PublicKeykeyprotected org.slf4j.Loggerlog(package private) OpenSSHKnownHosts.Markermarkerprivate KnownHostMatchers.HostMatchermatcherprotected KeyTypetype
-
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 booleanappliesTo(java.lang.String host)booleanappliesTo(KeyType type, java.lang.String host)java.lang.StringgetComment()java.lang.StringgetFingerprint()protected java.lang.StringgetHostPart()private java.lang.StringgetKeyString(java.security.PublicKey pk)java.lang.StringgetLine()KeyTypegetType()booleanverify(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:
getTypein interfaceOpenSSHKnownHosts.KnownHostEntry
-
getFingerprint
public java.lang.String getFingerprint()
- Specified by:
getFingerprintin interfaceOpenSSHKnownHosts.KnownHostEntry
-
appliesTo
public boolean appliesTo(java.lang.String host) throws java.io.IOException- Specified by:
appliesToin interfaceOpenSSHKnownHosts.KnownHostEntry- Throws:
java.io.IOException
-
appliesTo
public boolean appliesTo(KeyType type, java.lang.String host) throws java.io.IOException
- Specified by:
appliesToin interfaceOpenSSHKnownHosts.KnownHostEntry- Throws:
java.io.IOException
-
verify
public boolean verify(java.security.PublicKey key) throws java.io.IOException- Specified by:
verifyin interfaceOpenSSHKnownHosts.KnownHostEntry- Throws:
java.io.IOException
-
getLine
public java.lang.String getLine()
- Specified by:
getLinein interfaceOpenSSHKnownHosts.KnownHostEntry
-
getKeyString
private java.lang.String getKeyString(java.security.PublicKey pk)
-
getHostPart
protected java.lang.String getHostPart()
-
getComment
public java.lang.String getComment()
-
-