Home | History | Annotate | Download | only in openssh

Lines Matching defs:authctxt

49 static int auth2_challenge_start(Authctxt *);
50 static int send_userauth_info_request(Authctxt *);
186 * try challenge-response, set authctxt->postponed if we have to
190 auth2_challenge(Authctxt *authctxt, char *devs)
193 authctxt->user ? authctxt->user : "<nouser>",
196 if (authctxt->user == NULL || !devs)
198 if (authctxt->kbdintctxt == NULL)
199 authctxt->kbdintctxt = kbdint_alloc(devs);
200 return auth2_challenge_start(authctxt);
205 auth2_challenge_stop(Authctxt *authctxt)
209 if (authctxt->kbdintctxt != NULL) {
210 kbdint_free(authctxt->kbdintctxt);
211 authctxt->kbdintctxt = NULL;
215 /* side effect: sets authctxt->postponed if a reply was sent*/
217 auth2_challenge_start(Authctxt *authctxt)
219 KbdintAuthctxt *kbdintctxt = authctxt->kbdintctxt;
225 auth2_challenge_stop(authctxt);
231 if ((kbdintctxt->ctxt = kbdintctxt->device->init_ctx(authctxt)) == NULL) {
232 auth2_challenge_stop(authctxt);
235 if (send_userauth_info_request(authctxt) == 0) {
236 auth2_challenge_stop(authctxt);
242 authctxt->postponed = 1;
247 send_userauth_info_request(Authctxt *authctxt)
253 kbdintctxt = authctxt->kbdintctxt;
282 Authctxt *authctxt = ctxt;
288 if (authctxt == NULL)
289 fatal("input_userauth_info_response: no authctxt");
290 kbdintctxt = authctxt->kbdintctxt;
296 authctxt->postponed = 0; /* reset */
321 authenticated = authctxt->valid ? 1 : 0;
325 if (send_userauth_info_request(authctxt) == 1)
326 authctxt->postponed = 1;
335 if (!authctxt->postponed) {
337 auth2_challenge_stop(authctxt);
340 /* may set authctxt->postponed */
341 auth2_challenge_start(authctxt);
344 userauth_finish(authctxt, authenticated, method);