diff options
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__ */ |