Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
KHTTPDIGEST_VALIDATE(3)      Library Functions Manual	 KHTTPDIGEST_VALIDATE(3)

NAME
     khttpdigest_validate,  khttpdigest_validatehash  -- validate an HTTP digest
     request

LIBRARY
     libkcgi

SYNOPSIS
     #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);

DESCRIPTION
     The khttpdigest_validate() and khttpdigest_validatehash()	functions  vali-
     date  the	given password (or a pre-combined hash) with the HTTP digest-au-
     thorised request req as returned by khttp_parse(3) or  khttp_fcgi_parse(3).
     It  fully implements all components of the digest: QOP, MD5 types, etc.  It
     does not check that the URI component of the digest matches that of the re-
     quest, as these values are known to be mutable.

     The khttpdigest_validate() function will compute a hash  from  the  request
     and  password;  khttpdigest_validatehash()  operates on a pre-computed hash
     value.

RETURN VALUES
     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  al-
     ready authenticated by the web server), or greater than zero if the valida-
     tion succeeded.

SEE ALSO
     kcgi(3), khttp_fcgi_parse(3), khttp_parse(3), khttpbasic_validate(3)

AUTHORS
     The  khttpdigest_validate()  and  khttpdigest_validatehash() functions were
     written by Kristaps Dzonsons <kristaps@bsd.lv>.

FreeBSD ports 15.quarterly	   $Mdocdate$		 KHTTPDIGEST_VALIDATE(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=khttpdigest_validate&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help