• Home
  • Raw
  • Download

Lines Matching refs:authctxt

82 userauth_jpake(Authctxt *authctxt)  in userauth_jpake()  argument
90 if (authctxt->user != NULL) { in userauth_jpake()
91 if (authctxt->jpake_ctx == NULL) in userauth_jpake()
92 authctxt->jpake_ctx = jpake_new(); in userauth_jpake()
94 authenticated = auth2_jpake_start(authctxt); in userauth_jpake()
108 auth2_jpake_stop(Authctxt *authctxt) in auth2_jpake_stop() argument
114 if (authctxt->jpake_ctx != NULL) { in auth2_jpake_stop()
115 jpake_free(authctxt->jpake_ctx); in auth2_jpake_stop()
116 authctxt->jpake_ctx = NULL; in auth2_jpake_stop()
220 fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme) in fake_salt_and_scheme() argument
227 if ((lc = login_getclass(authctxt->pw->pw_class)) == NULL && in fake_salt_and_scheme()
240 xasprintf(salt, "$1$%s$", makesalt(8, authctxt->user)); in fake_salt_and_scheme()
243 *salt = xstrdup(makesalt(2, authctxt->user)); in fake_salt_and_scheme()
251 makesalt(4, authctxt->user)); in fake_salt_and_scheme()
258 makesalt(22, authctxt->user)); in fake_salt_and_scheme()
263 __func__, *scheme, authctxt->user, *salt); in fake_salt_and_scheme()
272 auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s, in auth2_jpake_get_pwdata() argument
281 authctxt->valid, authctxt->pw->pw_passwd); in auth2_jpake_get_pwdata()
286 if (authctxt->valid) { in auth2_jpake_get_pwdata()
287 if (strncmp(authctxt->pw->pw_passwd, "$2$", 3) == 0 && in auth2_jpake_get_pwdata()
288 strlen(authctxt->pw->pw_passwd) > 28) { in auth2_jpake_get_pwdata()
295 strlcpy(*salt, authctxt->pw->pw_passwd, salt_len); in auth2_jpake_get_pwdata()
297 } else if (strncmp(authctxt->pw->pw_passwd, "$2a$", 4) == 0 && in auth2_jpake_get_pwdata()
298 strlen(authctxt->pw->pw_passwd) > 29) { in auth2_jpake_get_pwdata()
305 strlcpy(*salt, authctxt->pw->pw_passwd, salt_len); in auth2_jpake_get_pwdata()
307 } else if (strncmp(authctxt->pw->pw_passwd, "$1$", 3) == 0 && in auth2_jpake_get_pwdata()
308 strlen(authctxt->pw->pw_passwd) > 5) { in auth2_jpake_get_pwdata()
313 cp = strchr(authctxt->pw->pw_passwd + 3, '$'); in auth2_jpake_get_pwdata()
315 salt_len = (cp - authctxt->pw->pw_passwd) + 1; in auth2_jpake_get_pwdata()
317 strlcpy(*salt, authctxt->pw->pw_passwd, in auth2_jpake_get_pwdata()
321 } else if (strncmp(authctxt->pw->pw_passwd, "_", 1) == 0 && in auth2_jpake_get_pwdata()
322 strlen(authctxt->pw->pw_passwd) > 9) { in auth2_jpake_get_pwdata()
329 strlcpy(*salt, authctxt->pw->pw_passwd, salt_len); in auth2_jpake_get_pwdata()
331 } else if (strlen(authctxt->pw->pw_passwd) == 13 && in auth2_jpake_get_pwdata()
332 valid_crypt_salt(authctxt->pw->pw_passwd[0]) && in auth2_jpake_get_pwdata()
333 valid_crypt_salt(authctxt->pw->pw_passwd[1])) { in auth2_jpake_get_pwdata()
340 strlcpy(*salt, authctxt->pw->pw_passwd, salt_len); in auth2_jpake_get_pwdata()
345 __func__, authctxt->pw->pw_name); in auth2_jpake_get_pwdata()
349 fake_salt_and_scheme(authctxt, salt, hash_scheme); in auth2_jpake_get_pwdata()
351 if (hash_buffer(authctxt->pw->pw_passwd, in auth2_jpake_get_pwdata()
352 strlen(authctxt->pw->pw_passwd), EVP_sha256(), in auth2_jpake_get_pwdata()
372 auth2_jpake_start(Authctxt *authctxt) in auth2_jpake_start() argument
374 struct jpake_ctx *pctx = authctxt->jpake_ctx; in auth2_jpake_start()
387 PRIVSEP(auth2_jpake_get_pwdata(authctxt, &pctx->s, in auth2_jpake_start()
417 authctxt->postponed = 1; in auth2_jpake_start()
425 Authctxt *authctxt = ctxt; in input_userauth_jpake_client_step1() local
426 struct jpake_ctx *pctx = authctxt->jpake_ctx; in input_userauth_jpake_client_step1()
483 Authctxt *authctxt = ctxt; in input_userauth_jpake_client_step2() local
484 struct jpake_ctx *pctx = authctxt->jpake_ctx; in input_userauth_jpake_client_step2()
533 Authctxt *authctxt = ctxt; in input_userauth_jpake_client_confirm() local
534 struct jpake_ctx *pctx = authctxt->jpake_ctx; in input_userauth_jpake_client_confirm()
551 authenticated = authctxt->valid ? 1 : 0; in input_userauth_jpake_client_confirm()
556 authctxt->postponed = 0; in input_userauth_jpake_client_confirm()
557 jpake_free(authctxt->jpake_ctx); in input_userauth_jpake_client_confirm()
558 authctxt->jpake_ctx = NULL; in input_userauth_jpake_client_confirm()
559 userauth_finish(authctxt, authenticated, method_jpake.name); in input_userauth_jpake_client_confirm()