Lines Matching defs:state
31 static void handle_basic_params(HTTPAuthState *state, const char *key,
35 *dest = state->realm;
36 *dest_len = sizeof(state->realm);
40 static void handle_digest_params(HTTPAuthState *state, const char *key,
43 DigestParams *digest = &state->digest_params;
46 *dest = state->realm;
47 *dest_len = sizeof(state->realm);
63 static void handle_digest_update(HTTPAuthState *state, const char *key,
66 DigestParams *digest = &state->digest_params;
87 void ff_http_auth_handle_header(HTTPAuthState *state, const char *key,
93 state->auth_type <= HTTP_AUTH_BASIC) {
94 state->auth_type = HTTP_AUTH_BASIC;
95 state->realm[0] = 0;
97 state);
99 state->auth_type <= HTTP_AUTH_DIGEST) {
100 state->auth_type = HTTP_AUTH_DIGEST;
101 memset(&state->digest_params, 0, sizeof(DigestParams));
102 state->realm[0] = 0;
104 state);
105 choose_qop(state->digest_params.qop,
106 sizeof(state->digest_params.qop));
110 state);
130 static char *make_digest_auth(HTTPAuthState *state, const char *username,
134 DigestParams *digest = &state->digest_params;
159 update_md5_strings(md5ctx, username, ":", state->realm, ":", password, NULL);
204 len = strlen(username) + strlen(state->realm) + strlen(digest->nonce) +
216 av_strlcatf(authstr, len, ",realm=\"%s\"", state->realm);
235 char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth,
243 if (state->auth_type == HTTP_AUTH_BASIC) {
254 } else if (state->auth_type == HTTP_AUTH_DIGEST) {
262 authstr = make_digest_auth(state, username, password, path, method);