We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
any
fingerprint
1 parent db79e0f commit a5696f1Copy full SHA for a5696f1
src/main/scala/com/decodified/scalassh/HostConfig.scala
@@ -221,7 +221,10 @@ object HostKeyVerifiers {
221
catch { case e: Exception => Left("Could not read %s due to %s".format(knownHostsFile, e)) }
222
} else Left(knownHostsFile.toString + " not found")
223
}
224
- def forFingerprint(fingerprint: String) = new HostKeyVerifier {
225
- def verify(hostname: String, port: Int, key: PublicKey) = SecurityUtils.getFingerprint(key) == fingerprint
+ def forFingerprint(fingerprint: String) = fingerprint match {
+ case "any" | "ANY" => DontVerify
226
+ case fp => new HostKeyVerifier {
227
+ def verify(hostname: String, port: Int, key: PublicKey) = SecurityUtils.getFingerprint(key) == fp
228
+ }
229
230
0 commit comments