Merge remote-tracking branch 'origin/GP-1710_Dan_errorPopupOnDeclineSshHostKey'

This commit is contained in:
Ryan Kurtz
2023-04-24 06:50:28 -04:00
2 changed files with 8 additions and 2 deletions

View File

@@ -211,10 +211,16 @@ public class GhidraSshPtyFactory implements PtyFactory {
return session;
}
catch (JSchException e) {
if (e.getMessage().equals("Auth cancel")) {
String message = e.getMessage();
if (message.equals("Auth cancel")) {
Msg.error(this, "SSH connection canceled");
throw new CancellationException("SSH connection canceled");
}
else if (message.startsWith("reject HostKey")) {
String cancelMessage = "SSH " + message;
Msg.error(this, cancelMessage);
throw new CancellationException(cancelMessage);
}
Msg.error(this, "SSH connection error");
throw new IOException("SSH connection error", e);
}

View File

@@ -810,7 +810,7 @@ public class DebuggerCopyIntoProgramDialog extends ReusableDialogComponentProvid
protected void executeCapture(AddressRange range, TraceRecorder recorder, TaskMonitor monitor)
throws Exception {
synchronized (this) {
monitor.checkCanceled();
monitor.checkCancelled();
CompletableFuture<Void> recCapture =
recorder.readMemoryBlocks(new AddressSet(range), monitor);
this.captureTask = recCapture.thenCompose(__ -> {