Dillo v3.1.1-119-g140d9ebd
|
Go to the source code of this file.
Functions | |
static Dstr * | md5hexdigest (const Dstr *data) |
char * | a_Digest_create_cnonce (void) |
Returns a pointer to a newly allocated string containing a cnonce. | |
int | a_Digest_compute_digest (AuthRealm_t *realm, const char *username, const char *passwd) |
This portion only has to be calculated once. | |
static Dstr * | Digest_create_response (AuthRealm_t *realm, const char *method, const char *digest_uri, const Dstr *entity_body) |
This portion is calculatd for each request. | |
static void | Digest_Dstr_append_token_value (Dstr *str, int delimiter, const char *token, const char *value, int quoted) |
char * | a_Digest_authorization_hdr (AuthRealm_t *realm, const DilloUrl *url, const char *digest_uri) |
Construct Digest Authorization header. | |
Variables | |
static const char * | ALGORITHM2STR [] = { NULL, "MD5", "MD5-sess" } |
static const char * | QOP2STR [] = { NULL, "auth", "auth-int" } |
static const char | hexchars [] = "0123456789abcdef" |
char * a_Digest_authorization_hdr | ( | AuthRealm_t * | realm, |
const DilloUrl * | url, | ||
const char * | digest_uri | ||
) |
Construct Digest Authorization header.
Field ordering: furaisanjin reports that his DVD recorder requires the order that IE happens to use: "username, realm, nonce, uri, cnonce, nc, algorithm, response, qop". It apparently doesn't use "opaque", so that's been left where it already was.
Definition at line 169 of file digest.c.
References AuthRealm_t::algorithm, ALGORITHM2STR, ALGORITHMNOTSET, AuthRealm_t::cnonce, Digest_create_response(), Digest_Dstr_append_token_value(), dStr_free(), dStr_new(), dStr_sprintfa(), AuthRealm_t::name, AuthRealm_t::nonce, AuthRealm_t::nonce_count, AuthRealm_t::opaque, AuthRealm_t::qop, QOP2STR, QOPNOTSET, Dstr::str, URL_DATA, URL_FLAGS, URL_Post, and AuthRealm_t::username.
Referenced by a_Auth_get_auth_str().
int a_Digest_compute_digest | ( | AuthRealm_t * | realm, |
const char * | username, | ||
const char * | passwd | ||
) |
This portion only has to be calculated once.
Definition at line 54 of file digest.c.
References AuthRealm_t::algorithm, ALGORITHMNOTSET, AuthRealm_t::authorization, AuthRealm_t::cnonce, dStr_free(), dStr_new(), dStr_shred(), dStr_sprintf(), MD5, md5hexdigest(), MD5SESS, MSG, AuthRealm_t::name, AuthRealm_t::nonce, and Dstr::str.
Referenced by Auth_do_auth_dialog_cb().
char * a_Digest_create_cnonce | ( | void | ) |
Returns a pointer to a newly allocated string containing a cnonce.
Definition at line 41 of file digest.c.
References dNew, and hexchars.
Referenced by Auth_do_auth_dialog_cb().
|
static |
This portion is calculatd for each request.
Definition at line 92 of file digest.c.
References AUTH, AUTHINT, AuthRealm_t::authorization, AuthRealm_t::cnonce, dStr_free(), dStr_new(), dStr_sprintf(), md5hexdigest(), MSG, AuthRealm_t::nonce, AuthRealm_t::nonce_count, AuthRealm_t::qop, QOP2STR, QOPNOTSET, and Dstr::str.
Referenced by a_Digest_authorization_hdr().
|
static |
Definition at line 142 of file digest.c.
References dStr_append(), dStr_append_c(), and dStr_sprintfa().
Referenced by a_Digest_authorization_hdr().
Definition at line 22 of file digest.c.
References dStr_sized_new(), dStr_sprintfa(), Dstr::len, md5_append(), md5_finish(), md5_init(), and Dstr::str.
Referenced by a_Digest_compute_digest(), and Digest_create_response().
|
static |
Definition at line 18 of file digest.c.
Referenced by a_Digest_authorization_hdr().
|
static |
Definition at line 20 of file digest.c.
Referenced by a_Digest_create_cnonce().
|
static |
Definition at line 19 of file digest.c.
Referenced by a_Digest_authorization_hdr(), and Digest_create_response().