diff options
author | Stef Walter <stef@memberwebs.com> | 2008-06-11 21:48:27 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-06-11 21:48:27 +0000 |
commit | 0cb3f6098d959479a96c26a92d91becc2110b30d (patch) | |
tree | 22f1447d6c7ad77d802c476297cf9547f822f81a /daemon/digest.h | |
parent | 67d7a6cc4d3234ac93e521632701e8d42513e042 (diff) |
Support getting groups from the server and limiting access based on LDAP groups. See #112
Diffstat (limited to 'daemon/digest.h')
-rw-r--r-- | daemon/digest.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/daemon/digest.h b/daemon/digest.h index af8a1d7..7a0f59c 100644 --- a/daemon/digest.h +++ b/daemon/digest.h @@ -22,8 +22,11 @@ #ifndef __DIGEST_H__ #define __DIGEST_H__ +#include "httpauthd.h" #include "md5.h" +#include <sys/time.h> + #define DIGEST_NONCE_LEN sizeof(time_t) + sizeof(unsigned int) + MD5_LEN #define DIGEST_SECRET_LEN 16 @@ -53,7 +56,8 @@ typedef struct digest_context const char* server_uri; const char* server_method; - unsigned char ha1[MD5_LEN]; + unsigned char server_userhash[MD5_LEN]; + unsigned char server_ha1[MD5_LEN]; } digest_context_t; @@ -78,4 +82,8 @@ int digest_complete_check(digest_context_t* dg, const ha_context_t* opts, ha_buf /* This assumes a digest_context that's been checked and validated successfully */ const char* digest_respond(digest_context_t* dg, ha_buffer_t* buf, unsigned char* next); +void digest_makenonce(unsigned char* nonce, unsigned char* secret, unsigned char* old); +int digest_checknonce(unsigned char* nonce, unsigned char* secret, time_t* tm); +void digest_escape (ha_buffer_t *buf, const char *orig); + #endif /* __DIGEST_H__ */ |