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

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

?? httpauth.c

?? 站點映像程序
?? C
?? 第 1 頁 / 共 2 頁
字號:
	sess->stored_rdig = rdig;    }    /* And finally, H(A2) */    md5_process_bytes( a2_md5_ascii, 32, &rdig );    md5_finish_ctx( &rdig, rdig_md5 );    md5_hexify( rdig_md5, rdig_md5_ascii );        /* Buffer size calculation. */        retlen = 	6                                      /* Digest */	+ 1 + 8 + 1 + 2 + strlen(sess->username)  /*  username="..." */	+ 2 + 5 + 1 + 2 + strlen(sess->unq_realm) /* , realm="..." */	+ 2 + 5 + 1 + 2 + strlen(sess->unq_nonce) /* , nonce="..." */	+ 2 + 3 + 1 + 2 + strlen(sess->uri)       /* , uri="..." */	+ 2 + 8 + 1 + 2 + 32                      /* , response="..." */	+ 2 + 9 + 1 + strlen(http_auth_alg_names[sess->alg]) /* , algorithm= */	;    if( sess->opaque != NULL )	retlen += 2 + 6 + 1 + strlen(sess->opaque);   /* , opaque=... */    if( sess->qop != http_auth_qop_none )	retlen += 	    2 + 6 + 2 + 1 + strlen(sess->unq_cnonce) +   /* , cnonce="..." */	    2 + 2 + 1 + 8 +                       /* , nc=... */	    2 + 3 + 1 + strlen(http_auth_qop_values[sess->qop]) /* , qop=... */	    ;    retlen += 2;   /* \r\n */    DEBUG( DEBUG_HTTPAUTH, "Calculated length of buffer: %d\n", retlen );    ret = malloc( retlen + 1 );    sprintf( ret,	      "Digest username=\"%s\", realm=\"%s\""	      ", nonce=\"%s\", uri=\"%s\", response=\"%s\""	      ", algorithm=%s",	      sess->username, sess->unq_realm, 	      sess->unq_nonce, sess->uri, rdig_md5_ascii,	      http_auth_alg_names[sess->alg]);        if( sess->opaque != NULL ) {	/* We never unquote it, so it's still quoted here */	strcat( ret, ", opaque=" );	strcat( ret, sess->opaque );    }    if( sess->qop != http_auth_qop_none ) {	/* Add in cnonce and nc-value fields */	strcat( ret, ", cnonce=\"" );	strcat( ret, sess->unq_cnonce );	strcat( ret, "\", nc=" );	strcat( ret, nc_value );	strcat( ret, ", qop=" );	strcat( ret, http_auth_qop_values[sess->qop] );    }    DEBUG( DEBUG_HTTPAUTH, "Digest header field value:\n%s\n", ret );    strcat( ret, "\r\n" );    DEBUG( DEBUG_HTTPAUTH, "Calculated length: %d, actual length: %d\n", 	   retlen, strlen( ret ) );        return ret;}inline void http_auth_response_body( http_auth_session_t *sess, 				     const char *buffer, size_t buffer_len ) {    if( sess->scheme != http_auth_scheme_digest ) return;    DEBUG( DEBUG_HTTPAUTH, "Digesting %d bytes of response body.\n" );    md5_process_bytes( buffer, buffer_len, &sess->response_body );}/* Pass this the value of the 'Authentication-Info:' header field, if * one is received. Returns false if gives incorrect authentication * information for the server. */bool http_auth_verify_response( http_auth_session_t *sess, const char *value ) {    char **pairs;    http_auth_qop_t qop = http_auth_qop_none;    char *nextnonce = NULL, /* for the nextnonce= value */	*rspauth = NULL, /* for the rspauth= value */	*cnonce = NULL, /* for the cnonce= value */	*nc = NULL, /* for the nc= value */	*unquoted, *qop_value = NULL;    int n, nonce_count;    bool okay;        if( sess->scheme != http_auth_scheme_digest ) {	DEBUG( DEBUG_HTTPAUTH, "Found Auth-Info header not in response to Digest credentials - dodgy.\n" );	return false;    }        pairs = strpairs( value, ',', '=', http_quotes, http_whitespace );        for( n = 0; pairs[n]!=NULL; n+=2 ) {	unquoted = strstrip( pairs[n+1], '"' );	if( strcasecmp( pairs[n], "qop" ) == 0 ) {	    qop_value = strdup( pairs[n+1] );	    if( strcasecmp( pairs[n+1], "auth-int" ) == 0 ) {		qop = http_auth_qop_auth_int;	    } else if( strcasecmp( pairs[n+1], "auth" ) == 0 ) {		qop = http_auth_qop_auth;	    } else {		qop = http_auth_qop_none;	    }	} else if( strcasecmp( pairs[n], "nextnonce" ) == 0 ) {	    nextnonce = strdup( unquoted );	} else if( strcasecmp( pairs[n], "rspauth" ) == 0 ) {	    rspauth = strdup( unquoted );	} else if( strcasecmp( pairs[n], "cnonce" ) == 0 ) {	    cnonce = strdup( unquoted );	} else if( strcasecmp( pairs[n], "nc" ) == 0 ) { 	    nc = strdup( pairs[n] );	    if( sscanf( pairs[n+1], "%x", &nonce_count ) != 1 ) {		DEBUG( DEBUG_HTTPAUTH, "Couldn't scan [%s] for nonce count.\n",		       pairs[n+1] );	    } else {		DEBUG( DEBUG_HTTPAUTH, "Got nonce_count: %d\n", nonce_count );	    }	}	free( unquoted );    }    strpairs_free( pairs );    /* Presume the worst */    okay = false;    if( (qop != http_auth_qop_none) && (qop_value != NULL) ) {	if( (rspauth == NULL) || (cnonce == NULL) || (nc == NULL) ) {	    DEBUG( DEBUG_HTTPAUTH, "Missing rspauth, cnonce or nc with qop.\n" );	} else { /* Have got rspauth, cnonce and nc */	    if( strcmp( cnonce, sess->unq_cnonce ) != 0 ) {		DEBUG( DEBUG_HTTPAUTH, "Response cnonce doesn't match.\n" );	    } else if( nonce_count != sess->nonce_count ) { 		DEBUG( DEBUG_HTTPAUTH, "Response nonce count doesn't match.\n" );	    } else {		/* Calculate and check the response-digest value. */		/* TODO: Should we use our sent qop-value here, or		 * the one the server gave us? Currently, we use the server		 * qop-value... that's what mod_digest does.		 */		struct md5_ctx a2;		unsigned char a2_md5[16], rdig_md5[16];		char a2_md5_ascii[33], rdig_md5_ascii[33];		DEBUG( DEBUG_HTTPAUTH, "Calculating response-digest.\n" );		/* First off, H(A2) again. */		md5_init_ctx( &a2 );		md5_process_bytes( ":", 1, &a2 );		md5_process_bytes( sess->uri, strlen(sess->uri), &a2 );		if( qop == http_auth_qop_auth_int ) {		    unsigned char heb_md5[16];		    char heb_md5_ascii[33];		    /* Add on ":" H(entity-body) */		    md5_finish_ctx( &sess->response_body, heb_md5 );		    md5_hexify( heb_md5, heb_md5_ascii );		    md5_process_bytes( ":", 1, &a2 );		    md5_process_bytes( heb_md5_ascii, 32, &a2 );		    DEBUG( DEBUG_HTTPAUTH, "Digested [:%s]\n", heb_md5_ascii );		}		md5_finish_ctx( &a2, a2_md5 );		md5_hexify( a2_md5, a2_md5_ascii );				/* We have the stored digest-so-far of 		 *   H(A1) ":" unq(nonce-value) 		 *        [ ":" nc-value ":" unq(cnonce-value) ] for qop		 * in sess->stored_rdig, to safe digesting them again.		 *		 */		if( qop != http_auth_qop_none ) {		    /* Add in qop-value */		    DEBUG( DEBUG_HTTPAUTH, "Digesting qop-value [%s:].\n", 			   qop_value );		    md5_process_bytes( qop_value, strlen(qop_value), 				       &sess->stored_rdig );		    md5_process_bytes( ":", 1, &sess->stored_rdig );		}		/* Digest ":" H(A2) */		md5_process_bytes( a2_md5_ascii, 32, &sess->stored_rdig );		/* All done */		md5_finish_ctx( &sess->stored_rdig, rdig_md5 );		md5_hexify( rdig_md5, rdig_md5_ascii );		DEBUG( DEBUG_HTTPAUTH, "Calculated response-digest of: [%s]\n",		       rdig_md5_ascii );		DEBUG( DEBUG_HTTPAUTH, "Given response-digest of:      [%s]\n",		       rspauth );		/* And... do they match? */		okay = (strcmp( rdig_md5_ascii, rspauth ) == 0);				DEBUG( DEBUG_HTTPAUTH, "Matched: %s\n", 		       okay?"OH YES!":"nope." );	    }	    free( rspauth );	    free( cnonce );	    free( nc );	}	free( qop_value );    } else {	DEBUG( DEBUG_HTTPAUTH, "No qop directive, auth okay.\n" );	okay = true;    }    /* Check for a nextnonce */    if( nextnonce != NULL ) {	DEBUG( DEBUG_HTTPAUTH, "Found nextnonce of [%s].\n", nextnonce );	if( sess->unq_nonce != NULL )	    free( sess->unq_nonce );	sess->unq_nonce = nextnonce;    }    return okay;}bool http_auth_challenge( http_auth_session_t *sess, const char *value ) {    char **pairs, *pnt, *unquoted, *key;    http_auth_chall_t **challenges = NULL, *this_chall = NULL;    int numchalls = 0, n;    bool success;    DEBUG( DEBUG_HTTPAUTH, "Got new auth challenge: %s\n", value );    /* Clean up old session information. */    http_auth_clean( sess );    /* The header value may be made up of one or more challenges.     * We split it down into attribute-value pairs, then search for     * schemes in the pair keys.     */    pairs = strpairs( value, ',', '=', http_quotes, http_whitespace );    for( n = 0; pairs[n]!=NULL; n+=2 ) {	/* Look for an auth-scheme in the key */	pnt = strchr( pairs[n], ' ' );	if( pnt != NULL ) {	    /* We have a new challenge */	    DEBUG( DEBUG_HTTPAUTH, "New challenge.\n" );	    numchalls++;	    challenges = realloc( challenges, 				  numchalls * sizeof(http_auth_chall_t *) );	    challenges[numchalls-1] = malloc( sizeof(http_auth_chall_t) );	    this_chall = challenges[numchalls-1];	    /* Initialize the challenge parameters */	    memset( this_chall, 0, sizeof(http_auth_chall_t) );	    /* Which auth-scheme is it (case-insensitive matching) */	    if( strncasecmp( pairs[n], "basic ", 6 ) == 0 ) {		DEBUG( DEBUG_HTTPAUTH, "Basic scheme.\n" );		this_chall->scheme = http_auth_scheme_basic;	    } else if( strncasecmp( pairs[n], "digest ", 7 ) == 0 ) {		DEBUG( DEBUG_HTTPAUTH, "Digest scheme.\n" );		this_chall->scheme = http_auth_scheme_digest;	    } else {		DEBUG( DEBUG_HTTPAUTH, "Unknown scheme.\n" );		this_chall->scheme = http_auth_scheme_none;	    }	    /* Now, the real key for this pair starts after the 	     * auth-scheme... skipping whitespace */	    while( strchr( http_whitespace, *(++pnt) ) != NULL )		/* nullop */;	    key = pnt;	} else if( this_chall == NULL ) {	    /* If we haven't got an auth-scheme, and we're	     * haven't yet found a challenge, skip this pair.	     */	    continue;	} else {	    key = pairs[n];	}	DEBUG( DEBUG_HTTPAUTH, "Got pair: [%s] = [%s]\n", key, pairs[n+1] );	/* Most values are quoted, so unquote them here */	unquoted = strstrip( pairs[n+1], '"' );	/* Now parse the attribute */	DEBUG( DEBUG_HTTPAUTH, "Unquoted pair is: [%s]\n", unquoted );	if( strcasecmp( key, "realm" ) == 0 ) {	    this_chall->realm = pairs[n+1];	} else if( strcasecmp( key, "nonce" ) == 0 ) {	    this_chall->nonce = pairs[n+1];	} /* else if( strcasecmp( key, "domain" ) == 0 ) {	    this_chall->domain = pairs[n+1]; 	    } */ else if( strcasecmp( key, "opaque" ) == 0 ) {	    this_chall->opaque = pairs[n+1];	} else if( strcasecmp( key, "stale" ) == 0 ) {	    /* Truth value */	    this_chall->stale = 		( strcasecmp( unquoted, "true" ) == 0 );	} else if( strcasecmp( key, "algorithm" ) == 0 ) {	    if( strcasecmp( unquoted, "md5" ) == 0 ) {		this_chall->alg = http_auth_alg_md5;	    } else if( strcasecmp( unquoted, "md5-sess" ) == 0 ) {		this_chall->alg = http_auth_alg_md5_sess;	    } else {		this_chall->alg = http_auth_alg_unknown;	    }	} else if( strcasecmp( key, "qop" ) == 0 ) {	    char **qops;	    int qop;	    qops = strsplit( unquoted, ',', NULL, http_whitespace );	    this_chall->got_qop = true;	    for( qop = 0; qops[qop] != NULL; qop++ ) {		if( strcasecmp( qops[qop], "auth" ) == 0 ) {		    this_chall->qop_auth = true;		} else if( strcasecmp( qops[qop], "auth-int" ) == 0 ) {		    this_chall->qop_auth_int = true;		}	    }	    strsplit_free( qops );	}	free( unquoted );    }    /* Did we find any challenges */    if( numchalls == 0 )	return false;        DEBUG( DEBUG_HTTPAUTH, "Finished parsing parameters.\n" );    success = false;    DEBUG( DEBUG_HTTPAUTH, "Looking for Digest challenges.\n" );    /* Try a digest challenge */    for( n = 0; n < numchalls; n++ ) {	if( challenges[n]->scheme == http_auth_scheme_digest ) {	    if( http_auth_challenge_digest( sess, challenges[n] ) ) {		success = true;		break;	    }	}    }    if( !success ) {	DEBUG( DEBUG_HTTPAUTH, "No good Digest challenges, looking for Basic.\n" );	for( n = 0; n < numchalls; n++ ) {	    if( challenges[n]->scheme == http_auth_scheme_basic ) {		if( http_auth_challenge_basic( sess, challenges[n] ) ) {		    success = true;		    break;		}	    }	}	if( !success ) {	    /* No good challenges - record this in the session state */	    DEBUG( DEBUG_HTTPAUTH, "Did not understand any challenges.\n" );	    sess->scheme = http_auth_scheme_none;	}    }    /* Free up the parsed header values */    strpairs_free( pairs );    return success; 		    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
婷婷激情综合网| 一区二区在线免费观看| 国产在线精品国自产拍免费| 日韩午夜激情av| 久久成人免费网站| 国产欧美一区二区精品性色超碰| 成人伦理片在线| 亚洲日本中文字幕区| 欧美午夜宅男影院| 蜜桃视频在线观看一区| 国产欧美精品在线观看| 91农村精品一区二区在线| 亚洲一区二区三区四区不卡| 337p亚洲精品色噜噜| 极品瑜伽女神91| 中文字幕在线不卡一区| 在线看国产一区| 久久国产婷婷国产香蕉| 国产精品女人毛片| 国产精品久久午夜| 91免费国产在线观看| 日韩高清不卡一区二区| 2024国产精品| 色婷婷综合五月| 国产在线精品一区二区夜色 | 国产日韩高清在线| 91偷拍与自偷拍精品| 天天综合色天天综合| 国产精品欧美久久久久一区二区| 欧美探花视频资源| 粗大黑人巨茎大战欧美成人| 亚洲18色成人| 国产精品免费网站在线观看| 91精品国产乱| 91小视频在线免费看| 另类人妖一区二区av| 亚洲精品你懂的| 久久久久国色av免费看影院| 欧美色图12p| 不卡在线视频中文字幕| 激情综合亚洲精品| 亚洲aⅴ怡春院| 亚洲精品视频在线观看网站| 久久久夜色精品亚洲| 69堂精品视频| 91在线无精精品入口| 国产精品一区专区| 免费成人在线观看| 一区2区3区在线看| 中文久久乱码一区二区| 精品盗摄一区二区三区| 欧美日本国产视频| 99精品视频免费在线观看| 国产露脸91国语对白| 日产精品久久久久久久性色| 一二三四区精品视频| 亚洲天堂免费看| 国产精品麻豆99久久久久久| 久久嫩草精品久久久精品一| 日韩欧美中文字幕一区| 欧美日韩一区在线观看| 色综合一区二区三区| 成人免费不卡视频| 国产成人av电影在线播放| 国产一区二区三区四| 美日韩一级片在线观看| 日本欧美在线观看| 日韩中文字幕av电影| 亚洲成a人片综合在线| 亚洲高清免费观看 | 日韩高清在线电影| 图片区日韩欧美亚洲| 亚洲一卡二卡三卡四卡五卡| 一区二区三区精品在线| 亚洲欧美在线aaa| 亚洲欧美日韩电影| 亚洲精品成人少妇| 一区二区三区在线影院| 一区二区三区美女视频| 亚洲国产精品久久人人爱蜜臀| 亚洲最新视频在线播放| 午夜亚洲国产au精品一区二区| 亚洲福利一区二区| 日韩在线a电影| 另类的小说在线视频另类成人小视频在线| 日本中文在线一区| 国产一区二区三区四区五区美女| 国产精品99久久久久久宅男| 丁香婷婷综合网| 99精品在线免费| 欧美午夜电影网| 欧美一区二区视频在线观看2020| 日韩久久免费av| 久久久久国产成人精品亚洲午夜 | 色婷婷国产精品久久包臀| 色婷婷久久一区二区三区麻豆| 欧美在线影院一区二区| 欧美日本不卡视频| 亚洲成人一区在线| 蜜桃精品视频在线观看| 粉嫩一区二区三区性色av| 本田岬高潮一区二区三区| 91在线精品一区二区| 欧美日韩一二区| 精品美女被调教视频大全网站| 日本一区二区久久| 亚洲123区在线观看| 激情国产一区二区| 91网站在线播放| 日韩一区二区免费高清| 亚洲国产精品传媒在线观看| 亚洲观看高清完整版在线观看 | 久久国产生活片100| 成人三级伦理片| 欧美日韩一级二级三级| 国产视频亚洲色图| 亚洲国产精品视频| 国产精品自拍毛片| 欧美视频一区二| 久久久久久久精| 玉米视频成人免费看| 狠狠色狠狠色合久久伊人| www.亚洲激情.com| 日韩一区国产二区欧美三区| 国产精品全国免费观看高清| 亚洲成人动漫在线观看| 丰满白嫩尤物一区二区| 日韩三级中文字幕| 亚洲视频小说图片| 国产一区二区伦理片| 欧美羞羞免费网站| 欧美高清在线视频| 老司机午夜精品| 精品视频全国免费看| 国产欧美1区2区3区| 日韩黄色小视频| 日本乱人伦aⅴ精品| 日本一区二区成人| 国产一区免费电影| 日韩精品一区二区三区在线播放| 亚洲精品日韩一| av中文字幕不卡| 久久精品亚洲国产奇米99| 午夜精品久久久久影视| 一本一道波多野结衣一区二区| 久久久美女毛片| 久久精品国产亚洲a| 欧美精品日韩一本| 亚洲午夜影视影院在线观看| 91蝌蚪国产九色| 国产精品久久午夜| jvid福利写真一区二区三区| 久久精品视频一区| 狠狠色狠狠色综合日日91app| 欧美一区二区三区精品| 午夜精品福利一区二区三区av| 91在线精品秘密一区二区| 一区在线中文字幕| 成人99免费视频| 国产精品不卡一区| 不卡的av网站| 亚洲人123区| 色综合色综合色综合| 亚洲视频一二区| 一本大道久久a久久精品综合| 国产精品美女久久久久久久 | 中文字幕一区三区| 成人污视频在线观看| 国产精品无人区| 成人免费视频一区二区| 中文字幕亚洲欧美在线不卡| 成人免费视频caoporn| 国产精品婷婷午夜在线观看| 成人伦理片在线| 亚洲三级小视频| 欧美性猛交xxxxxxxx| 亚洲高清久久久| 91精品国产综合久久精品 | 精品制服美女久久| 精品乱人伦小说| 成人一二三区视频| |精品福利一区二区三区| 色综合久久久久网| 日韩中文字幕不卡| 久久这里只有精品视频网| 风间由美一区二区三区在线观看 | 久久综合久久综合九色| 国产成人av网站| 亚洲另类春色国产| 制服.丝袜.亚洲.中文.综合| 久久国产人妖系列| 国产精品久久久久久户外露出| 一本色道久久综合亚洲精品按摩| 亚洲图片欧美一区| 日韩欧美亚洲国产精品字幕久久久| 国产乱人伦精品一区二区在线观看| 一区精品在线播放| 欧美一区二区三区视频免费| 国产综合久久久久影院| 1024精品合集|