Lines Matching refs:auth
43 static struct auth { struct
44 struct auth *next; argument
53 struct auth *new; in MitAddCookie() argument
55 new = malloc(sizeof(struct auth)); in MitAddCookie()
75 struct auth *auth; in MitCheckCookie() local
77 for (auth = mit_auth; auth; auth = auth->next) { in MitCheckCookie()
78 if (data_length == auth->len && in MitCheckCookie()
79 timingsafe_memcmp(data, auth->data, (int) data_length) == 0) in MitCheckCookie()
80 return auth->id; in MitCheckCookie()
89 struct auth *auth, *next; in MitResetCookie() local
91 for (auth = mit_auth; auth; auth = next) { in MitResetCookie()
92 next = auth->next; in MitResetCookie()
93 free(auth->data); in MitResetCookie()
94 free(auth); in MitResetCookie()
103 struct auth *auth; in MitFromID() local
105 for (auth = mit_auth; auth; auth = auth->next) { in MitFromID()
106 if (id == auth->id) { in MitFromID()
107 *data_lenp = auth->len; in MitFromID()
108 *datap = auth->data; in MitFromID()
118 struct auth *auth, *prev; in MitRemoveCookie() local
121 for (auth = mit_auth; auth; prev = auth, auth = auth->next) { in MitRemoveCookie()
122 if (data_length == auth->len && in MitRemoveCookie()
123 memcmp(data, auth->data, data_length) == 0) { in MitRemoveCookie()
125 prev->next = auth->next; in MitRemoveCookie()
127 mit_auth = auth->next; in MitRemoveCookie()
128 free(auth->data); in MitRemoveCookie()
129 free(auth); in MitRemoveCookie()