Skip to content

Commit

Permalink
Fix #10130.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Jun 19, 2018
1 parent 000123b commit 4de7b08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ssh/pom.xml
Expand Up @@ -44,7 +44,7 @@
<dependency>
<groupId>ch.iterate.ssh</groupId>
<artifactId>sshj</artifactId>
<version>0.22.6</version>
<version>0.22.7</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
Expand Down
Expand Up @@ -176,27 +176,17 @@ public DelegatingOpenSSHKnownHosts(final Local file) throws IOException {
@Override
protected boolean hostKeyUnverifiableAction(final String hostname, final PublicKey key) {
try {
return isUnknownKeyAccepted(hostname, key);
return OpenSSHHostKeyVerifier.this.isUnknownKeyAccepted(hostname, key);
}
catch(ConnectionCanceledException | ChecksumException e) {
return false;
}
}

@Override
protected boolean hostKeyChangedAction(final KnownHostEntry entry, final String hostname, final PublicKey key) {
protected boolean hostKeyChangedAction(final String hostname, final PublicKey key) {
try {
final boolean accepted = isChangedKeyAccepted(hostname, key);
if(accepted) {
database.entries().remove(entry);
try {
database.write();
}
catch(IOException e) {
log.error(String.format("Failure removing host key from database: %s", e.getMessage()));
}
}
return accepted;
return OpenSSHHostKeyVerifier.this.isChangedKeyAccepted(hostname, key);
}
catch(ConnectionCanceledException | ChecksumException e) {
return false;
Expand Down

0 comments on commit 4de7b08

Please sign in to comment.