亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? auth_digest.c

?? 代理服務器 squid-2.6.STABLE16
?? C
?? 第 1 頁 / 共 4 頁
字號:
    node = digest_user->nonces.head;    while (node && (node->data != nonce))	node = node->next;    if (node)	return;    node = dlinkNodeNew();    dlinkAddTail(nonce, node, &digest_user->nonces);    authDigestNonceLink(nonce);    /* ping this nonce to this auth user */    assert((nonce->auth_user == NULL) || (nonce->auth_user = auth_user));    /* we don't lock this reference because removing the auth_user removes the      * hash too. Of course if that changes we're stuffed so read the code huh?     */    nonce->auth_user = auth_user;}/* authenticateDigestUsername: return a pointer to the username in the */static char *authenticateDigestUsername(auth_user_t * auth_user){    digest_user_h *digest_user = auth_user->scheme_data;    if (digest_user)	return digest_user->username;    return NULL;}/* setup the necessary info to log the username */static voidauthDigestLogUsername(auth_user_request_t * auth_user_request, char *username){    auth_user_t *auth_user;    digest_user_h *digest_user;    dlink_node *node;    /* log the username */    debug(29, 9) ("authDigestLogUsername: Creating new user for logging '%s'\n", username);    /* new auth_user */    auth_user = authenticateAuthUserNew("digest");    /* new scheme data */    digest_user = authDigestUserNew();    /* save the credentials */    digest_user->username = username;    /* link the scheme data in */    auth_user->scheme_data = digest_user;    /* set the auth_user type */    auth_user->auth_type = AUTH_BROKEN;    /* link the request to the user */    auth_user_request->auth_user = auth_user;    /* lock for the auth_user_request link */    authenticateAuthUserLock(auth_user);    node = dlinkNodeNew();    dlinkAdd(auth_user_request, node, &auth_user->requests);}/* * Decode a Digest [Proxy-]Auth string, placing the results in the passed * Auth_user structure. */static voidauthenticateDigestDecodeAuth(auth_user_request_t * auth_user_request, const char *proxy_auth){    String temp;    const char *item;    const char *p;    const char *pos = NULL;    char *username = NULL;    digest_nonce_h *nonce;    int ilen;    digest_request_h *digest_request;    digest_user_h *digest_user;    auth_user_t *auth_user;    dlink_node *node;    debug(29, 9) ("authenticateDigestDecodeAuth: beginning\n");    assert(auth_user_request != NULL);    digest_request = authDigestRequestNew();    /* trim DIGEST from string */    while (xisgraph(*proxy_auth))	proxy_auth++;    /* Trim leading whitespace before decoding */    while (xisspace(*proxy_auth))	proxy_auth++;    stringInit(&temp, proxy_auth);    while (strListGetItem(&temp, ',', &item, &ilen, &pos)) {	if ((p = strchr(item, '=')) && (p - item < ilen))	    ilen = p++ - item;	if (!strncmp(item, "username", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    username = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found Username '%s'\n", username);	} else if (!strncmp(item, "realm", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    digest_request->realm = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found realm '%s'\n", digest_request->realm);	} else if (!strncmp(item, "qop", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    if (*p == '\"')		/* quote mark */		p++;	    digest_request->qop = xstrndup(p, strcspn(p, "\" \t\r\n()<>@,;:\\/[]?={}") + 1);	    debug(29, 9) ("authDigestDecodeAuth: Found qop '%s'\n", digest_request->qop);	} else if (!strncmp(item, "algorithm", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    if (*p == '\"')		/* quote mark */		p++;	    digest_request->algorithm = xstrndup(p, strcspn(p, "\" \t\r\n()<>@,;:\\/[]?={}") + 1);	    debug(29, 9) ("authDigestDecodeAuth: Found algorithm '%s'\n", digest_request->algorithm);	} else if (!strncmp(item, "uri", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    digest_request->uri = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found uri '%s'\n", digest_request->uri);	} else if (!strncmp(item, "nonce", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    digest_request->nonceb64 = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found nonce '%s'\n", digest_request->nonceb64);	} else if (!strncmp(item, "nc", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    xstrncpy(digest_request->nc, p, 9);	    debug(29, 9) ("authDigestDecodeAuth: Found noncecount '%s'\n", digest_request->nc);	} else if (!strncmp(item, "cnonce", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    digest_request->cnonce = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found cnonce '%s'\n", digest_request->cnonce);	} else if (!strncmp(item, "response", ilen)) {	    /* white space */	    while (xisspace(*p))		p++;	    /* quote mark */	    p++;	    digest_request->response = xstrndup(p, strchr(p, '"') + 1 - p);	    debug(29, 9) ("authDigestDecodeAuth: Found response '%s'\n", digest_request->response);	}    }    stringClean(&temp);    /* now we validate the data given to us */    /*     * TODO: on invalid parameters we should return 400, not 407.     * Find some clean way of doing this. perhaps return a valid     * struct, and set the direction to clientwards combined with     * a change to the clientwards handling code (ie let the     * clientwards call set the error type (but limited to known     * correct values - 400/401/407     */    /* first the NONCE count */    if (digest_request->cnonce && strlen(digest_request->nc) != 8) {	debug(29, 4) ("authenticateDigestDecode: nonce count length invalid\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* now the nonce */    nonce = authenticateDigestNonceFindNonce(digest_request->nonceb64);    if (!nonce) {	/* we couldn't find a matching nonce! */	debug(29, 4) ("authenticateDigestDecode: Unexpected or invalid nonce received\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    digest_request->nonce = nonce;    authDigestNonceLink(nonce);    /* check the qop is what we expected. Note that for compatability with      * RFC 2069 we should support a missing qop. Tough. */    if (!digest_request->qop || strcmp(digest_request->qop, QOP_AUTH)) {	/* we received a qop option we didn't send */	debug(29, 4) ("authenticateDigestDecode: Invalid qop option received\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* we can't check the URI just yet. We'll check it in the     * authenticate phase */    /* is the response the correct length? */    if (!digest_request->response || strlen(digest_request->response) != 32) {	debug(29, 4) ("authenticateDigestDecode: Response length invalid\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* do we have a username ? */    if (!username || username[0] == '\0') {	debug(29, 4) ("authenticateDigestDecode: Empty or not present username\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* check that we're not being hacked / the username hasn't changed */    if (nonce->auth_user && strcmp(username, authenticateUserUsername(nonce->auth_user))) {	debug(29, 4) ("authenticateDigestDecode: Username for the nonce does not equal the username for the request\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* if we got a qop, did we get a cnonce or did we get a cnonce wihtout a qop? */    if ((digest_request->qop && !digest_request->cnonce)	|| (!digest_request->qop && digest_request->cnonce)) {	debug(29, 4) ("authenticateDigestDecode: qop without cnonce, or vice versa!\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* check the algorithm is present and supported */    if (!digest_request->algorithm)	digest_request->algorithm = xstrndup("MD5", 4);    else if (strcmp(digest_request->algorithm, "MD5")	&& strcmp(digest_request->algorithm, "MD5-sess")) {	debug(29, 4) ("authenticateDigestDecode: invalid algorithm specified!\n");	authDigestLogUsername(auth_user_request, username);	/* we don't need the scheme specific data anymore */	authDigestRequestDelete(digest_request);	auth_user_request->scheme_data = NULL;	return;    }    /* the method we'll check at the authenticate step as well */    /* we don't send or parse opaques. Ok so we're flexable ... */    /* find the user */    if ((auth_user = authDigestUserFindUsername(username)) == NULL) {	/* the user doesn't exist in the username cache yet */	debug(29, 9) ("authDigestDecodeAuth: Creating new digest user '%s'\n", username);	/* new auth_user */	auth_user = authenticateAuthUserNew("digest");	/* new scheme user data */	digest_user = authDigestUserNew();	/* save the username */	digest_user->username = username;	/* link the primary struct in */	auth_user->scheme_data = digest_user;	/* set the user type */	auth_user->auth_type = AUTH_DIGEST;	/* this auth_user struct is the one to get added to the	 * username cache */	/* store user in hash's */	authenticateUserNameCacheAdd(auth_user);	/* 	 * Add the digest to the user so we can tell if a hacking	 * or spoofing attack is taking place. We do this by assuming	 * the user agent won't change user name without warning.	 */	authDigestUserLinkNonce(auth_user, nonce);    } else {	debug(29, 9) ("authDigestDecodeAuth: Found user '%s' in the user cache as '%p'\n", username, auth_user);	digest_user = auth_user->scheme_data;	xfree(username);    }    /*link the request and the user */    auth_user_request->auth_user = auth_user;    auth_user_request->scheme_data = digest_request;    /* lock for the request link */    authenticateAuthUserLock(auth_user);    node = dlinkNodeNew();    dlinkAdd(auth_user_request, node, &auth_user->requests);    debug(29, 9) ("username = '%s'\nrealm = '%s'\nqop = '%s'\nalgorithm = '%s'\nuri = '%s'\nnonce = '%s'\nnc = '%s'\ncnonce = '%s'\nresponse = '%s'\ndigestnonce = '%p'\n",	digest_user->username, digest_request->realm,	digest_request->qop, digest_request->algorithm,	digest_request->uri, digest_request->nonceb64,	digest_request->nc, digest_request->cnonce, digest_request->response, nonce);    return;}/* send the initial data to a digest authenticator module */static voidauthenticateDigestStart(auth_user_request_t * auth_user_request, RH * handler, void *data){    authenticateStateData *r = NULL;    char buf[8192];    digest_request_h *digest_request;    digest_user_h *digest_user;    assert(auth_user_request);    assert(handler);    assert(auth_user_request->auth_user->auth_type == AUTH_DIGEST);    assert(auth_user_request->auth_user->scheme_data != NULL);    assert(auth_user_request->scheme_data != NULL);    digest_request = auth_user_request->scheme_data;    digest_user = auth_user_request->auth_user->scheme_data;    debug(29, 9) ("authenticateStart: '\"%s\":\"%s\"'\n", digest_user->username,	digest_request->realm);    if (digestConfig->authenticate == NULL) {	handler(data, NULL);	return;    }    r = cbdataAlloc(authenticateStateData);    r->handler = handler;    cbdataLock(data);    r->data = data;    r->auth_user_request = auth_user_request;    authenticateAuthUserRequestLock(r->auth_user_request);    snprintf(buf, 8192, "\"%s\":\"%s\"\n", digest_user->username, digest_request->realm);    helperSubmit(digestauthenticators, buf, authenticateDigestHandleReply, r);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕永久在线不卡| 美日韩黄色大片| 麻豆久久久久久| 不卡一区二区中文字幕| 91精品国产91久久久久久最新毛片 | 国产欧美一区二区精品久导航 | 久久99热这里只有精品| 91日韩一区二区三区| 日韩精品专区在线影院观看| 夜夜精品视频一区二区| 国产精品99久久不卡二区| 欧美电影在哪看比较好| 亚洲欧美偷拍三级| 丁香六月综合激情| 精品国产乱码久久久久久夜甘婷婷| 亚洲欧美色综合| 不卡视频免费播放| 久久免费看少妇高潮| 日韩电影在线观看一区| 在线免费观看视频一区| 亚洲色大成网站www久久九九| 国产999精品久久久久久| 欧美一激情一区二区三区| 亚洲一区av在线| 欧美综合欧美视频| 亚洲精品五月天| 色综合久久久久久久久久久| 中文字幕中文字幕一区| 国产v综合v亚洲欧| 欧美极品aⅴ影院| 成人av在线影院| 国产精品麻豆网站| 懂色av一区二区夜夜嗨| 欧美激情在线观看视频免费| 国产成人精品亚洲日本在线桃色 | 亚洲视频在线观看一区| 国产aⅴ综合色| 国产精品伦理一区二区| www.亚洲在线| 一区二区三区不卡视频在线观看| 色拍拍在线精品视频8848| 亚洲综合成人在线| 制服丝袜成人动漫| 精品一区二区在线免费观看| 久久亚洲一区二区三区明星换脸| 国产激情偷乱视频一区二区三区 | 亚洲精品一区二区三区影院 | 免费在线观看日韩欧美| 欧美不卡在线视频| 春色校园综合激情亚洲| 亚洲色图丝袜美腿| 欧美高清视频www夜色资源网| 麻豆91精品视频| 国产精品电影一区二区三区| 色综合久久久久久久久| 视频在线观看一区二区三区| wwwwxxxxx欧美| 色爱区综合激月婷婷| 亚洲国产欧美在线| 2021久久国产精品不只是精品| 成人三级伦理片| 午夜婷婷国产麻豆精品| 亚洲精品一区二区三区蜜桃下载 | 色网站国产精品| 日本一区中文字幕| 国产婷婷精品av在线| 欧美在线免费播放| 国产美女视频91| 一区二区三区美女视频| 日韩免费在线观看| 91蝌蚪porny九色| 久久精品二区亚洲w码| 亚洲色图制服诱惑 | 精品无码三级在线观看视频| 专区另类欧美日韩| 日韩一区二区免费高清| 99久久99久久久精品齐齐| 蜜臀va亚洲va欧美va天堂| 国产精品久久久久三级| 777奇米四色成人影色区| 国产98色在线|日韩| 日本视频免费一区| 亚洲美女在线国产| 久久精品视频一区二区| 欧美精品乱人伦久久久久久| www.日韩av| 国产精品影视网| 美女在线视频一区| 亚洲线精品一区二区三区| 国产欧美日韩中文久久| 日韩亚洲欧美一区| 在线视频综合导航| 北条麻妃国产九九精品视频| 国产乱人伦精品一区二区在线观看 | 91精品国产综合久久小美女| 97久久超碰精品国产| 国产麻豆一精品一av一免费 | 精品久久久久久久久久久久久久久久久| 91丨porny丨国产入口| 国产成人在线网站| 久久99这里只有精品| 日本美女视频一区二区| 亚洲一区二区高清| 亚洲精品大片www| 中文字幕日本不卡| 国产网站一区二区| 国产亚洲欧美日韩在线一区| 久久先锋影音av| 国产亚洲短视频| 国产亚洲欧美日韩在线一区| 久久久久久久久久久电影| 精品日本一线二线三线不卡| 欧美一区二区三区四区视频| 欧美精品一卡两卡| 欧美理论在线播放| 欧美一区二区在线看| 日韩一级高清毛片| 日韩欧美色电影| 精品乱人伦小说| 久久久亚洲综合| 中文字幕av资源一区| 国产精品成人午夜| 中文字幕不卡的av| 综合久久久久综合| 一区二区三区四区中文字幕| 亚洲最大色网站| 日本欧美久久久久免费播放网| 日本成人在线电影网| 极品少妇一区二区三区精品视频| 国产乱人伦偷精品视频不卡| av亚洲精华国产精华精| 99视频精品全部免费在线| 99久久精品免费看国产免费软件| 不卡的av在线| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 欧美性受xxxx| 欧美tickling挠脚心丨vk| 国产拍欧美日韩视频二区| 亚洲精品中文在线影院| 天天做天天摸天天爽国产一区 | 国产欧美一二三区| 中文字幕一区二区三区精华液 | 欧美日韩国产影片| 日韩视频一区在线观看| 久久精品视频免费| 亚洲综合色区另类av| 久久精品国产在热久久| 高清av一区二区| 欧美三级视频在线播放| 精品国产污网站| 亚洲免费观看在线观看| 日本亚洲天堂网| 99久久伊人久久99| 91麻豆精品国产91久久久更新时间 | 国产精品久久久久久久久免费樱桃 | 日韩精品一区在线| 国产精品成人免费在线| 免播放器亚洲一区| 99精品1区2区| 久久久不卡网国产精品一区| 亚洲一区在线观看视频| 国产一本一道久久香蕉| 欧美日本视频在线| 国产精品久久久久久久久免费樱桃| 蜜臀久久99精品久久久久宅男| 99精品热视频| 欧美r级电影在线观看| 午夜欧美视频在线观看| 成人小视频在线| 欧美videofree性高清杂交| 一二三四社区欧美黄| 成人成人成人在线视频| 精品久久久三级丝袜| 视频一区中文字幕国产| 91亚洲男人天堂| 中文字幕av一区 二区| 久久精品国产第一区二区三区| 欧美系列在线观看| 国产精品视频九色porn| 经典三级在线一区| 日韩欧美区一区二| 秋霞av亚洲一区二区三| 欧美色图片你懂的| 亚洲精品国产视频| av欧美精品.com| 中文字幕不卡的av| 国v精品久久久网| 久久众筹精品私拍模特| 日韩精品一区第一页| 欧美午夜不卡在线观看免费| 亚洲精品视频一区二区| 播五月开心婷婷综合| 国产精品久久久久一区二区三区| 成人免费视频免费观看| 国产午夜精品一区二区三区嫩草| 狠狠色狠狠色综合系列| 久久日韩精品一区二区五区| 精品亚洲免费视频| 久久亚洲综合色一区二区三区| 国产乱理伦片在线观看夜一区|