khttpdigest_validate,
khttpdigest_validatehash —
validate an HTTP digest request
#include
<sys/types.h>
#include <stdarg.h>
#include <stdint.h>
#include <kcgi.h>
int
khttpdigest_validate(struct kreq
*req, const char *password);
int
khttpdigest_validatehash(struct kreq
*req, const char *hash);
khttpdigest_validate() and
khttpdigest_validatehash() will return zero if
validation failed, less than zero if the request was not properly set up for
HTTP digest validation (no HTTP method, not a digest request, not already
authenticated by the web server), or greater than zero if the validation
succeeded.
The khttpdigest_validate() and
khttpdigest_validatehash() functions were written by
Kristaps Dzonsons
<kristaps@bsd.lv>.