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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? htaabrow.c

?? www工具包. 這是W3C官方支持的www支撐庫. 其中提供通用目的的客戶端的WebAPI: complete HTTP/1.1 (with caching, pipelining, PUT, POS
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* 								     HTAABrow.c**	BROWSER SIDE ACCESS AUTHORIZATION MODULE****	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.**	@(#) $Id: HTAABrow.c,v 2.60 2001/03/14 16:25:50 kahan Exp $****	Contains code for parsing challenges and creating credentials for **	basic authentication schemes. See also the HTAAUtil module**	for how to handle other authentication schemes. You don't have to use**	this code at all.**** AUTHORS:**	AL	Ari Luotonen	luotonen@dxcern.cern.ch**	HFN	Henrik Frystyk**      JKO     Jose Kahan      **** HISTORY:**	Oct 17	AL	Made corrections suggested by marca:**			Added  if (!realm->username) return NULL;**			Changed some ""s to NULLs.**			Now doing HT_CALLOC() to init uuencode source;**			otherwise HTUU_encode() reads uninitialized memory**			every now and then (not a real bug but not pretty).**			Corrected the formula for uuencode destination size.**	Feb 96 HFN	Rewritten to make it scheme independent and based on**			callback functions and an info structure**      Nov 98 JKO      Added support for message digest authentication**    Jun 2000 JKO      Changed the buffer size for HTUU_encode in order**                      to avoid a potential SIGSEV when calling that **                      function (as advised by Heiner Kallweit).**    Mar 2001 JKO      When doing pipelining digest requests, the stale**                      nonce reply appears only for one of such requests,**                      all the following ones in the pipe will receive a **                      401. I added some code to take into account these cases**                      by trying to infer if a nonce is stale. ***//* Portions of this code (as indicated) are derived from the Internet Draft** draft-ietf-http-authentication-03 and are covered by the following** copyright:** Copyright (C) The Internet Society (1998). All Rights Reserved.** This document and translations of it may be copied and furnished to** others, and derivative works that comment on or otherwise explain it or** assist in its implmentation may be prepared, copied, published and** distributed, in whole or in part, without restriction of any kind,** provided that the above copyright notice and this paragraph are included** on all such copies and derivative works. However, this document itself** may not be modified in any way, such as by removing the copyright notice** or references to the Internet Society or other Internet organizations,** except as needed for the purpose of developing Internet standards in** which case the procedures for copyrights defined in the Internet** Standards process must be followed, or as required to translate it into** languages other than English.** The limited permissions granted above are perpetual and will not be** revoked by the Internet Society or its successors or assigns.** This document and the information contained herein is provided on an "AS** IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK** FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT** LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT** INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR** FITNESS FOR A PARTICULAR PURPOSE.**//* Library include files */#include "WWWLib.h"#include "HTAAUtil.h"#include "HTParse.h"#include "HTAABrow.h"					 /* Implemented here */#include "HTDigest.h"#define BASIC_AUTH	"basic"#define DIGEST_AUTH	"digest"#define DIGEST_AI       "authentication-info"#define PROXY_DIGEST_AI "proxy-authentication-info"typedef struct _HTBasic {		  /* Basic challenge and credentials */    char *	uid;    char *	pw;    BOOL	retry;			    /* Should we ask the user again? */    BOOL	proxy;				     /* Proxy authentication */} HTBasic;typedef struct _HTDigest {		 /* Digest challenge and credentials */  /* digest info can be shared by one or more UT entries */    int         references;                /* client authentication data */    char *	uid;    char *	pw;    char *      realm;    char *      cnonce;    long        nc;  /* server authentication data */    char *	nonce;    char *	opaque;  /* session authentication data */    int         algorithm;    char *      qop;    BOOL	stale;    BOOL	retry;			    /* Should we ask the user again? */    BOOL	proxy;				     /* Proxy authentication */} HTDigest;#define HASHLEN 16typedef char HASH[HASHLEN+1];#define HASHHEXLEN 32typedef char HASHHEX[HASHHEXLEN+1];/* ------------------------------------------------------------------------- *//***	Create a protection template for the files**	in the same directory as the given file**	Returns	a template matching docname, and other files in that directory.****		E.g.  /foo/bar/x.html  =>  /foo/bar/ ***						    ^**				Space only to prevent it from**				being a comment marker here,**				there really isn't any space.*/PRIVATE char * make_template (const char * docname){    char * tmplate = NULL;    if (docname) {	char * host = HTParse(docname, "", PARSE_ACCESS|PARSE_HOST|PARSE_PUNCTUATION);	char * path = HTParse(docname, "", PARSE_PATH|PARSE_PUNCTUATION);	char * slash = strrchr(path, '/');	if (slash) {#if 0	    if (*(slash+1)) {				strcpy(slash, "*");		StrAllocCat(host, path);	    } else		StrAllocCat(host, "/*");#else	    if (*(slash+1)) {		strcpy(slash + 1, "*");		StrAllocCat(host, path);	    } else {                StrAllocCat(host, path);                StrAllocCat(host, "*");	    }#endif	}	HT_FREE(path);	tmplate = host;    } else	StrAllocCopy(tmplate, "*");    HTTRACE(AUTH_TRACE, "Template.... Made template `%s' for file `%s'\n" _ 		tmplate _ docname ? docname : "<null>");    return tmplate;}/* ------------------------------------------------------------------------- *//*				Basic Authentication                         *//* ------------------------------------------------------------------------- *//***	Prompt the user for username and password.**	Returns	YES if user name was typed in, else NO*/PRIVATE int prompt_user (HTRequest * request, const char * realm,			 HTBasic * basic){    HTAlertCallback * cbf = HTAlert_find(HT_A_USER_PW);    /* If no method for prompting the user then we might as well give up */    if (!cbf) return HT_ERROR;    /* Otherwise go ahead and ask the user */    if (request) {	HTAlertPar * reply = HTAlert_newReply();	int msg = basic->proxy ? HT_MSG_PROXY_UID : HT_MSG_UID;	BOOL res = (*cbf)(request, HT_A_USER_PW, msg,			  basic->uid, (char *) realm, reply);	if (res) {	    HT_FREE(basic->uid);	    HT_FREE(basic->pw);	    basic->uid = HTAlert_replyMessage(reply);	    basic->pw = HTAlert_replySecret(reply);	}	HTAlert_deleteReply(reply);	return res ? HT_OK : HT_ERROR;    }    return HT_OK;}PRIVATE HTBasic * HTBasic_new(){    HTBasic * me = NULL;    if ((me = (HTBasic *) HT_CALLOC(1, sizeof(HTBasic))) == NULL)	HT_OUTOFMEM("HTBasic_new");    me->retry = YES;			       /* Ask the first time through */    return me;}/*	HTBasic_delete**	--------------**	Deletes a "basic" information object*/PUBLIC int HTBasic_delete (void * context){    HTBasic * basic = (HTBasic *) context;    if (basic) {	HT_FREE(basic->uid);	HT_FREE(basic->pw);	HT_FREE(basic);	return YES;    }    return NO;}/***	Make basic authentication scheme credentials and register this**	information in the request object as credentials. They will then**	be included in the request header. An example is ****		"Basic AkRDIhEF8sdEgs72F73bfaS=="****	The function can both create normal and proxy credentials**	Returns	HT_OK or HT_ERROR*/PRIVATE BOOL basic_credentials (HTRequest * request, HTBasic * basic){    if (request && basic) {	char * cleartext = NULL;	char * cipher = NULL;	int cl_len = strlen(basic->uid ? basic->uid : "") +	    strlen(basic->pw ? basic->pw : "") + 5;	int ci_len = 5 + 4 * (cl_len/3);	if ((cleartext = (char *) HT_CALLOC(1, cl_len)) == NULL)	    HT_OUTOFMEM("basic_credentials");	*cleartext = '\0';	if (basic->uid) strcpy(cleartext, basic->uid);	strcat(cleartext, ":");	if (basic->pw) strcat(cleartext, basic->pw);	if ((cipher = (char *) HT_CALLOC(1, ci_len + 3)) == NULL)	    HT_OUTOFMEM("basic_credentials");	HTUU_encode((unsigned char *) cleartext, strlen(cleartext), cipher);	/* Create the credentials and assign them to the request object */	{	    int cr_len = strlen("basic") + ci_len + 3;	    char * cookie = (char *) HT_MALLOC(cr_len+1);	    if (!cookie) HT_OUTOFMEM("basic_credentials");	    strcpy(cookie, "Basic ");	    strcat(cookie, cipher);	    HTTRACE(AUTH_TRACE, "Basic Cookie `%s\'\n" _ cookie);	    /* Check whether it is proxy or normal credentials */	    if (basic->proxy)		HTRequest_addCredentials(request, "Proxy-Authorization", cookie);	    else		HTRequest_addCredentials(request, "Authorization", cookie);	    HT_FREE(cookie);	}	HT_FREE(cleartext);	HT_FREE(cipher);	return HT_OK;    }    return HT_ERROR;}/*	HTBasic_generate**	----------------**	This function generates "basic" credentials for the challenge found in**	the authentication information base for this request. The result is**	stored as an association list in the request object.**	This is a callback function for the AA handler.*/PUBLIC int HTBasic_generate (HTRequest * request, void * context, int mode){     HTBasic * basic = (HTBasic *) context;    BOOL proxy = mode==HT_NO_PROXY_ACCESS ? YES : NO;    if (request) {	const char * realm = HTRequest_realm(request);	/*	**  If we were asked to explicitly ask the user again	*/	if (mode == HT_REAUTH || mode == HT_PROXY_REAUTH)	    basic->retry = YES;	/*	** If we don't have a basic context then add a new one to the tree.	** We use different trees for normal and proxy authentication	*/	if (!basic) {		basic = HTBasic_new();	    if (proxy) {		char * url = HTRequest_proxy(request);		basic->proxy = YES;		HTAA_updateNode(proxy, BASIC_AUTH, realm, url, basic);	    } else {		char * url = HTAnchor_address((HTAnchor*)HTRequest_anchor(request));		HTAA_updateNode(proxy, BASIC_AUTH, realm, url, basic);		HT_FREE(url);	    }	}	/*	** If we have a set of credentials (or the user provides a new set)	** then store it in the request object as the credentials	*/	if ((basic->retry && prompt_user(request, realm, basic) == HT_OK) ||	    (!basic->retry && basic->uid)) {	    basic->retry = NO;	    return basic_credentials(request, basic);	} else {	    char * url = HTAnchor_address((HTAnchor*)HTRequest_anchor(request));	    HTAA_deleteNode(proxy, BASIC_AUTH, realm, url);	    HT_FREE(url);	    return HT_ERROR;	}    }    return HT_OK;}/*	HTBasic_parse**	-------------**	This function parses the contents of a "basic" challenge **	and stores the challenge in our authentication information datebase.**	We also store the realm in the request object which will help finding**	the right set of credentials to generate.**	The function is a callback function for the AA handler.*/PUBLIC int HTBasic_parse (HTRequest * request, HTResponse * response,			  void * context, int status){    HTAssocList * challenge = HTResponse_challenge(response);    HTBasic * basic = NULL;    BOOL proxy = status==HT_NO_PROXY_ACCESS ? YES : NO;    if (request && challenge) {	char * p = HTAssocList_findObject(challenge, BASIC_AUTH);	char * realm = HTNextField(&p);	char * rm = HTNextField(&p);	/*	** If valid challenge then make a template for the resource and	** store this information in our authentication URL Tree	*/	if (realm && !strcasecomp(realm, "realm") && rm) {	    HTTRACE(AUTH_TRACE, "Basic Parse. Realm `%s\' found\n" _ rm);	    HTRequest_setRealm(request, rm);	    /*	    **  If we are in proxy mode then add the proxy - not the final URL	    */	    if (proxy) {		char * url = HTRequest_proxy(request);		HTTRACE(AUTH_TRACE, "Basic Parse. Proxy authentication\n");		basic = (HTBasic *) HTAA_updateNode(proxy, BASIC_AUTH, rm,						    url, NULL);		/* if the previous authentication failed, then try again */		if (HTRequest_AAretrys (request) > 1 		    && status == HT_NO_ACCESS && basic)		  basic->retry = YES;	    } else {		char * url = HTAnchor_address((HTAnchor *)					      HTRequest_anchor(request));

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人综合激情网| 色综合中文综合网| 毛片基地黄久久久久久天堂| 久久精品视频一区二区| 这里只有精品视频在线观看| 波多野结衣的一区二区三区| 免费在线一区观看| 一区二区在线观看视频| 国产精品免费aⅴ片在线观看| 日韩一区二区三| 欧美美女黄视频| 日本精品一级二级| 不卡一区二区在线| 国产成人免费视频| 国产一区二区在线看| 日本中文字幕一区二区有限公司| 亚洲黄色片在线观看| 国产精品国产三级国产普通话三级 | 成人午夜短视频| 久久国产精品色| 美国十次了思思久久精品导航| 亚洲成a人在线观看| 亚洲欧洲制服丝袜| 亚洲欧美日韩综合aⅴ视频| 中文字幕国产一区| 中文字幕成人在线观看| 久久美女艺术照精彩视频福利播放| 欧美久久久一区| 欧美网站一区二区| 欧美亚洲图片小说| 91传媒视频在线播放| 91偷拍与自偷拍精品| av在线不卡电影| 成人国产精品视频| 99精品黄色片免费大全| 99国内精品久久| 91网址在线看| 在线中文字幕不卡| 欧日韩精品视频| 欧美日韩视频在线一区二区 | 日韩欧美高清在线| 欧美一级在线观看| 精品欧美久久久| 精品国产sm最大网站免费看| 精品欧美一区二区三区精品久久| 日韩欧美一区二区视频| 欧美第一区第二区| 精品国产乱码久久久久久闺蜜| 欧美成人艳星乳罩| 欧美激情一区三区| 日韩美女久久久| 亚洲国产精品视频| 秋霞午夜av一区二区三区| 老司机精品视频线观看86| 国产精品系列在线播放| 91网址在线看| 911国产精品| 久久综合久久综合久久综合| 国产精品欧美综合在线| 一区二区三区国产| 日本 国产 欧美色综合| 国产成人精品亚洲777人妖| 91小视频免费看| 欧美一区二区三区公司| 日韩免费视频一区| 日本不卡免费在线视频| 加勒比av一区二区| 成人伦理片在线| 91成人免费在线| 日韩欧美中文字幕制服| 欧美国产综合一区二区| 亚洲综合图片区| 精品一区二区综合| 色综合天天做天天爱| 在线播放中文一区| 欧美国产精品劲爆| 日日摸夜夜添夜夜添国产精品| 国产一区二区中文字幕| 在线看国产一区二区| 欧美电视剧在线观看完整版| 亚洲色图另类专区| 精品在线你懂的| 在线亚洲精品福利网址导航| 日韩欧美的一区二区| 亚洲欧洲美洲综合色网| 久久精品国产亚洲一区二区三区| 成人精品视频一区二区三区| 欧美精品 日韩| 国产精品美女一区二区三区| 欧美a级理论片| 91在线观看成人| 精品日韩99亚洲| 亚洲国产美国国产综合一区二区| 国产91在线|亚洲| 日韩一区二区三区在线| 一区二区三区精品在线| 国产精品99久久久久| 91精选在线观看| 亚洲综合色区另类av| 丁香五精品蜜臀久久久久99网站| 日韩午夜激情av| 亚欧色一区w666天堂| 白白色亚洲国产精品| 精品福利在线导航| 午夜国产精品一区| 在线一区二区三区做爰视频网站| 久久精品夜夜夜夜久久| 日本美女视频一区二区| 欧美三级电影在线观看| 国产精品久久久久久久久晋中 | 亚洲国产成人av网| av电影一区二区| 欧美国产精品一区二区| 国产主播一区二区| 精品国产三级电影在线观看| 欧美aaaaa成人免费观看视频| 欧美日韩激情一区二区三区| 一区二区三区四区在线播放 | 欧美国产日韩精品免费观看| 激情综合网激情| 日韩欧美综合在线| 日韩精品亚洲一区| 在线播放日韩导航| 午夜精品久久久久久不卡8050| 91精品1区2区| 亚洲精品成a人| 色婷婷av一区二区三区软件 | 欧美中文字幕一区| 尤物av一区二区| 91麻豆精品一区二区三区| 国产精品高清亚洲| 国产91精品在线观看| 国产性色一区二区| 成人av在线资源网站| 国产精品青草综合久久久久99| 欧美精品一区二区三区蜜桃视频| 蜜臀久久久久久久| 日韩精品一区二区三区蜜臀| 韩国av一区二区三区四区| 久久无码av三级| 成人午夜在线免费| 亚洲人成电影网站色mp4| 日本精品免费观看高清观看| 亚洲一区二区三区免费视频| 7777精品伊人久久久大香线蕉最新版| 日韩极品在线观看| 亚洲精品在线三区| 粉嫩绯色av一区二区在线观看| 国产精品青草综合久久久久99| 91天堂素人约啪| 亚洲午夜精品在线| 欧美一级日韩一级| 国产福利一区在线| 亚洲精选一二三| 欧美日韩高清一区| 国内成人自拍视频| 国产精品国产a| 欧美另类久久久品| 国产麻豆一精品一av一免费 | 国产精品丝袜在线| 色猫猫国产区一区二在线视频| 亚洲国产一区二区三区 | 国产精品网站在线播放| 91免费观看视频| 首页亚洲欧美制服丝腿| 久久久久久久久一| 91丨九色porny丨蝌蚪| 日韩精品国产欧美| 国产精品视频一二| 欧美偷拍一区二区| 精品无人区卡一卡二卡三乱码免费卡| 欧美国产成人精品| 欧美日韩国产高清一区| 国产高清不卡一区二区| 亚洲国产成人av| 国产片一区二区| 欧美色偷偷大香| 国产91精品精华液一区二区三区| 亚洲午夜电影网| 中文字幕国产一区| 欧美一二三区在线观看| 99久久99久久精品国产片果冻 | 亚洲综合在线电影| 久久免费电影网| 欧美日韩成人一区二区| 粉嫩一区二区三区在线看| 午夜伦欧美伦电影理论片| 国产精品欧美久久久久无广告 | 亚洲欧美韩国综合色| 2020国产精品自拍| 欧美日韩午夜在线| 波多野洁衣一区| 国产在线日韩欧美| 天堂影院一区二区| 国产精品电影一区二区| 欧美v亚洲v综合ⅴ国产v| 在线视频一区二区三区| 国产v综合v亚洲欧| 欧美电影免费观看完整版| 在线观看视频一区二区|