Lines Matching refs:token

83 	if (state->token) {
84 free(state->token->key);
85 free(state->token->realm);
86 free(state->token);
87 state->token = NULL;
103 const struct token *
114 const struct token *t;
180 if (state->token && state->replay != 0) {
267 /* Free the old token so we log acceptance */
268 if (state->token) {
269 free(state->token);
270 state->token = NULL;
296 /* Find a token for the realm and secret */
319 if (state->token &&
320 (state->token->secretid != t->secretid ||
321 state->token->realm_len != t->realm_len ||
322 memcmp(state->token->realm, t->realm, t->realm_len)))
374 if (state->token == NULL) {
376 * recreate the token list. So we duplicate it. */
377 state->token = malloc(sizeof(*state->token));
378 if (state->token) {
379 state->token->secretid = t->secretid;
380 state->token->key = malloc(t->key_len);
381 if (state->token->key) {
382 state->token->key_len = t->key_len;
383 memcpy(state->token->key, t->key, t->key_len);
385 free(state->token);
386 state->token = NULL;
390 state->token->realm = malloc(t->realm_len);
391 if (state->token->realm) {
392 state->token->realm_len = t->realm_len;
393 memcpy(state->token->realm, t->realm,
396 free(state->token->key);
397 free(state->token);
398 state->token = NULL;
402 state->token->realm = NULL;
403 state->token->realm_len = 0;
406 /* If we cannot save the token, we must invalidate */
407 if (state->token == NULL)
512 * Either we know which token to use from the server response
513 * or we are using a basic configuration token.
514 * token is the token to encrypt with.
522 const struct token *t,
533 /* Ignore the token argument given to us - always send using the
534 * configured token. */