Lines Matching refs:conf
428 digest_config_rec *conf;
434 conf = (digest_config_rec *) apr_pcalloc(p, sizeof(digest_config_rec));
435 if (conf) {
436 conf->qop_list = apr_array_make(p, 2, sizeof(char *));
437 conf->nonce_lifetime = DFLT_NONCE_LIFE;
438 conf->dir_name = apr_pstrdup(p, dir);
439 conf->algorithm = DFLT_ALGORITHM;
442 return conf;
447 digest_config_rec *conf = (digest_config_rec *) config;
464 conf->realm = realm;
470 apr_sha1_init(&conf->nonce_ctx);
471 apr_sha1_update_binary(&conf->nonce_ctx, secret, SECRET_LEN);
472 apr_sha1_update_binary(&conf->nonce_ctx, (const unsigned char *) realm,
481 digest_config_rec *conf = (digest_config_rec*)config;
508 if (!conf->providers) {
509 conf->providers = newp;
512 authn_provider_list *last = conf->providers;
525 digest_config_rec *conf = (digest_config_rec *) config;
528 apr_array_clear(conf->qop_list);
529 *(const char **)apr_array_push(conf->qop_list) = "none";
540 *(const char **)apr_array_push(conf->qop_list) = op;
1035 const digest_config_rec *conf)
1040 memcpy(&ctx, &conf->nonce_ctx, sizeof(ctx));
1062 const digest_config_rec *conf)
1067 if (conf->nonce_lifetime != 0) {
1081 gen_nonce_hash(nonce+NONCE_TIME_LEN, nonce, opaque, server, conf);
1133 const digest_config_rec *conf,
1139 if (apr_is_empty_array(conf->qop_list)) {
1142 else if (!strcasecmp(*(const char **)(conf->qop_list->elts), "none")) {
1147 apr_array_pstrcat(r->pool, conf->qop_list, ','),
1156 if ((conf->check_nc || conf->nonce_lifetime == 0)
1191 nonce = gen_nonce(r->pool, r->request_time, opaque, r->server, conf);
1192 if (resp->client && conf->nonce_lifetime == 0) {
1206 if (r->proxyreq || !conf->uri_list) {
1210 domain = conf->uri_list;
1218 ap_auth_name(r), nonce, conf->algorithm,
1229 digest_config_rec *conf;
1248 /* get our conf */
1250 conf = (digest_config_rec *) ap_get_module_config(r->per_dir_config,
1253 note_digest_auth_failure(r, conf, resp, 0);
1264 digest_config_rec *conf)
1270 current_provider = conf->providers;
1297 auth_result = provider->get_realm_hash(r, user, conf->realm,
1308 if (!conf->providers) {
1316 conf->ha1 = password;
1323 const digest_config_rec *conf)
1329 if (conf->check_nc && !client_shm) {
1336 if (!conf->check_nc || !client_shm) {
1340 if (!apr_is_empty_array(conf->qop_list) &&
1341 !strcasecmp(*(const char **)(conf->qop_list->elts), "none")) {
1376 const digest_config_rec *conf)
1386 note_digest_auth_failure(r, conf, resp, 1);
1393 gen_nonce_hash(hash, resp->nonce, resp->opaque, r->server, conf);
1401 note_digest_auth_failure(r, conf, resp, 1);
1406 if (conf->nonce_lifetime > 0 && dt < 0) {
1410 note_digest_auth_failure(r, conf, resp, 1);
1414 if (conf->nonce_lifetime > 0) {
1415 if (dt > conf->nonce_lifetime) {
1420 (double)apr_time_sec(conf->nonce_lifetime));
1421 note_digest_auth_failure(r, conf, resp, 1);
1425 else if (conf->nonce_lifetime == 0 && resp->client) {
1430 note_digest_auth_failure(r, conf, resp, 1);
1457 const digest_config_rec *conf)
1461 ha1 = conf->ha1;
1534 digest_config_rec *conf;
1568 /* get our conf */
1570 conf = (digest_config_rec *) ap_get_module_config(r->per_dir_config,
1589 note_digest_auth_failure(r, conf, resp, 0);
1690 note_digest_auth_failure(r, conf, resp, 0);
1694 if (!conf->realm) {
1698 note_digest_auth_failure(r, conf, resp, 0);
1702 if (!resp->realm || strcmp(resp->realm, conf->realm)) {
1705 resp->realm, conf->realm);
1706 note_digest_auth_failure(r, conf, resp, 0);
1715 note_digest_auth_failure(r, conf, resp, 0);
1719 return_code = get_hash(r, r->user, conf);
1724 r->user, conf->realm, r->uri);
1725 note_digest_auth_failure(r, conf, resp, 0);
1735 r->user, conf->realm, r->uri);
1736 note_digest_auth_failure(r, conf, resp, 0);
1752 if (strcmp(resp->digest, old_digest(r, resp, conf->ha1))) {
1756 note_digest_auth_failure(r, conf, resp, 0);
1763 const char **tmp = (const char **)(conf->qop_list->elts);
1764 for (idx = 0; idx < conf->qop_list->nelts; idx++) {
1773 && !(apr_is_empty_array(conf->qop_list)
1778 note_digest_auth_failure(r, conf, resp, 0);
1782 exp_digest = new_digest(r, resp, conf);
1791 note_digest_auth_failure(r, conf, resp, 0);
1796 if (check_nc(r, resp, conf) != OK) {
1797 note_digest_auth_failure(r, conf, resp, 0);
1803 if ((res = check_nonce(r, resp, conf))) {
1816 const digest_config_rec *conf =
1824 if (resp == NULL || !resp->needed_auth || conf == NULL) {
1833 if (conf->nonce_lifetime > 0) {
1835 if ((r->request_time - resp->nonce_time) > (conf->nonce_lifetime-NEXTNONCE_DELTA)) {
1838 resp->opaque, r->server, conf),
1844 else if (conf->nonce_lifetime == 0 && resp->client) {
1846 conf);
1855 if (!apr_is_empty_array(conf->qop_list) &&
1856 !strcasecmp(*(const char **)(conf->qop_list->elts), "none")
1866 ha1 = conf->ha1;