summaryrefslogtreecommitdiffstats
path: root/src/auth/mech-digest-md5-private.h
blob: fb9ff803a720574e12b9690e411fd8fc3548a1eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MECH_DIGEST_MD5_PRIVATE_H
#define MECH_DIGEST_MD5_PRIVATE_H

#include "auth-request.h"

enum qop_option {
	QOP_AUTH	= 0x01,	/* authenticate */
	QOP_AUTH_INT	= 0x02, /* + integrity protection, not supported yet */
	QOP_AUTH_CONF	= 0x04, /* + encryption, not supported yet */

	QOP_COUNT	= 3
};

struct digest_auth_request {
	struct auth_request auth_request;

	pool_t pool;

	/* requested: */
	char *nonce;
	enum qop_option qop;

	/* received: */
	char *username;
	char *cnonce;
	char *nonce_count;
	char *qop_value;
	char *digest_uri; /* may be NULL */
	char *authzid; /* may be NULL, authorization ID */
	unsigned char response[32];
	unsigned long maxbuf;
	bool nonce_found:1;

	/* final reply: */
	char *rspauth;
};

#endif