Lines Matching refs:ai

390 …d_cmp (const char *userpw, unsigned long userpwlen, http_auth_info_t * const ai, const char *reqpw)  in mod_authn_dbi_password_cmp()  argument
398 { ai->username, ai->ulen } in mod_authn_dbi_password_cmp()
400 ,{ ai->realm, ai->rlen } in mod_authn_dbi_password_cmp()
426 …n_dbi_query_build (buffer * const sqlquery, dbi_config * const dbconf, http_auth_info_t * const ai) in mod_authn_dbi_query_build() argument
431 const buffer * const sqlb = (ai->userhash) in mod_authn_dbi_query_build()
445 if (ai->ulen < sizeof(buf)) { in mod_authn_dbi_query_build()
446 memcpy(buf, ai->username, ai->ulen); in mod_authn_dbi_query_build()
447 buf[ai->ulen] = '\0'; in mod_authn_dbi_query_build()
454 if (ai->rlen < sizeof(buf)) { in mod_authn_dbi_query_build()
455 memcpy(buf, ai->realm, ai->rlen); in mod_authn_dbi_query_build()
456 buf[ai->rlen] = '\0'; in mod_authn_dbi_query_build()
463 if (ai->dalgo & HTTP_AUTH_DIGEST_SHA256) in mod_authn_dbi_query_build()
465 else if (ai->dalgo & HTTP_AUTH_DIGEST_MD5) in mod_authn_dbi_query_build()
467 else if (ai->dalgo == HTTP_AUTH_DIGEST_NONE) in mod_authn_dbi_query_build()
496 mod_authn_dbi_query (request_st * const r, void *p_d, http_auth_info_t * const ai, const char * con… in mod_authn_dbi_query() argument
503 buffer * const sqlquery = mod_authn_dbi_query_build(r->tmp_buf, dbconf, ai); in mod_authn_dbi_query()
532 if (0 == mod_authn_dbi_password_cmp(rpw, len, ai, pw)) in mod_authn_dbi_query()
537 if (len == (ai->dlen << 1) in mod_authn_dbi_query()
538 && 0 == li_hex2bin(ai->digest,sizeof(ai->digest),rpw,len)) in mod_authn_dbi_query()
542 if (ai->userhash) { in mod_authn_dbi_query()
545 ai->username = ai->userbuf; in mod_authn_dbi_query()
546 if (len != DBI_LENGTH_ERROR && rpw && len <= sizeof(ai->userbuf) in mod_authn_dbi_query()
549 memcpy(ai->userbuf, rpw, (ai->ulen = len)); in mod_authn_dbi_query()
551 ai->ulen = 1; in mod_authn_dbi_query()
552 ai->userbuf[0] = '\0'; /* invalid username "\0" */ in mod_authn_dbi_query()
566 http_auth_info_t ai; in mod_authn_dbi_basic() local
567 ai.dalgo = HTTP_AUTH_DIGEST_NONE; in mod_authn_dbi_basic()
568 ai.dlen = 0; in mod_authn_dbi_basic()
569 ai.username = username->ptr; in mod_authn_dbi_basic()
570 ai.ulen = buffer_clen(username); in mod_authn_dbi_basic()
571 ai.realm = require->realm->ptr; in mod_authn_dbi_basic()
572 ai.rlen = buffer_clen(require->realm); in mod_authn_dbi_basic()
573 ai.userhash = 0; in mod_authn_dbi_basic()
574 rc = mod_authn_dbi_query(r, p_d, &ai, pw); in mod_authn_dbi_basic()
583 mod_authn_dbi_digest (request_st * const r, void *p_d, http_auth_info_t * const ai) in mod_authn_dbi_digest() argument
585 return mod_authn_dbi_query(r, p_d, ai, NULL); in mod_authn_dbi_digest()