diff options
Diffstat (limited to 'os/mitauth.c')
-rw-r--r-- | os/mitauth.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/os/mitauth.c b/os/mitauth.c index 768a52a22..e75d700e1 100644 --- a/os/mitauth.c +++ b/os/mitauth.c @@ -76,7 +76,7 @@ MitCheckCookie(unsigned short data_length, for (auth = mit_auth; auth; auth = auth->next) { if (data_length == auth->len && - memcmp(data, auth->data, (int) data_length) == 0) + timingsafe_memcmp(data, auth->data, (int) data_length) == 0) return auth->id; } *reason = "Invalid MIT-MAGIC-COOKIE-1 key"; @@ -97,19 +97,6 @@ MitResetCookie(void) return 0; } -XID -MitToID(unsigned short data_length, char *data) -{ - struct auth *auth; - - for (auth = mit_auth; auth; auth = auth->next) { - if (data_length == auth->len && - memcmp(data, auth->data, data_length) == 0) - return auth->id; - } - return (XID) -1; -} - int MitFromID(XID id, unsigned short *data_lenp, char **datap) { |