Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Commit

Permalink
Assorted bug fixes for runtime passphrase prompts.
Browse files Browse the repository at this point in the history
Now I'm able to use the new feature in a less horrible UI, I'm
exploring all the code paths that weren't tested before.
  • Loading branch information
sgtatham committed Feb 8, 2020
1 parent d72c8d1 commit 86ebc37
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pageant.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ void pageant_passphrase_request_success(PageantClientDialogId *dlgid,
fail_requests_for_key(pk, "unable to decrypt key");
return;
} else if (pk->skey == SSH2_WRONG_PASSPHRASE) {
pk->skey = NULL;

/*
* Find a PageantClient to use for another attempt at
* request_passphrase.
Expand All @@ -496,11 +498,12 @@ void pageant_passphrase_request_success(PageantClientDialogId *dlgid,
PageantSignOp *so = container_of(pk->blocked_requests.next,
PageantSignOp, pkr);

pk->decryption_prompt_active = false;
if (!request_passphrase(so->pao.info->pc, pk)) {
fail_requests_for_key(pk, "unable to continue creating "
"passphrase prompts");
return;
}
return;
}
}

Expand All @@ -514,7 +517,7 @@ void pageant_passphrase_request_refused(PageantClientDialogId *dlgid)
assert(gui_request_in_progress);
gui_request_in_progress = false;

unblock_requests_for_key(pk);
fail_requests_for_key(pk, "user refused to supply passphrase");
}

typedef struct PageantImmOp PageantImmOp;
Expand Down

0 comments on commit 86ebc37

Please sign in to comment.