Lines Matching defs:token
256 * 3. discreet token/pin prompting
289 char *token = NULL, *pin = NULL;
309 "Expected [%d] and given [%zu] token size "
319 talloc_free(token);
324 token = talloc_strndup(mem_ctx, fa2, fa2_len);
325 if (token == NULL) {
328 talloc_set_destructor(token, token_pin_destructor);
333 token = talloc_asprintf(mem_ctx, "%s%s", fa1, fa2);
334 if (token == NULL) {
337 talloc_set_destructor(token, token_pin_destructor);
350 /* If check is set, we need to verify the contents of the token. */
351 for (i = 0; check != NULL && token[i] != '\0'; i++) {
352 if (!check(token[i])) {
353 talloc_free(token);
359 *out_token = token;
368 char *token = NULL, *pin = NULL;
391 token = talloc_strndup(mem_ctx, pwd, len);
392 if (token == NULL) {
395 talloc_set_destructor(token, token_pin_destructor);
402 talloc_free(token);
407 talloc_free(token);
414 talloc_free(token);
419 /* Remove the PIN from the front of the token value. */
420 memmove(token, token + len - ti->length, ti->length + 1);
425 talloc_free(token);
431 talloc_free(token);
445 /* If check is set, we need to verify the contents of the token. */
446 for (i = 0; check != NULL && token[i] != '\0'; i++) {
447 if (!check(token[i])) {
448 talloc_free(token);
454 *out_token = token;
502 char *token = NULL, *pin = NULL;
550 &token, &pin);
582 ret = krb5_responder_otp_set_answer(ctx, rctx, i, token, pin);
584 talloc_free(token);