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

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

?? asn1.c

?? eCos操作系統源碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
    if (intsize != sizeof (long)){	_asn_size_err(errpre, intsize, sizeof(long));	return NULL;    }    integer = *intp;    mask = ((u_long) 0xFF) << (8 * (sizeof(long) - 1));    /* mask is 0xFF000000 on a big-endian machine */    if ((u_char)((integer & mask) >> (8 * (sizeof(long) - 1))) & 0x80){	/* if MSB is set */	add_null_byte = 1;	intsize++;    } else {	/*	 * Truncate "unnecessary" bytes off of the most significant end of this 2's complement integer.	 * There should be no sequence of 9 consecutive 1's or 0's at the most significant end of the	 * integer.	 */	mask = ((u_long) 0x1FF) << ((8 * (sizeof(long) - 1)) - 1);	/* mask is 0xFF800000 on a big-endian machine */	while((((integer & mask) == 0) || ((integer & mask) == mask)) && intsize > 1){	    intsize--;	    integer <<= 8;	}    }    data = asn_build_header(data, datalength, type, intsize);    if (_asn_build_header_check(errpre,data,*datalength,intsize))	return NULL;    *datalength -= intsize;    if (add_null_byte == 1){	*data++ = '\0';	intsize--;    }    mask = ((u_long) 0xFF) << (8 * (sizeof(long) - 1));    /* mask is 0xFF000000 on a big-endian machine */    while(intsize--){	*data++ = (u_char)((integer & mask) >> (8 * (sizeof(long) - 1)));	integer <<= 8;    }    return data;}/* * asn_parse_string - pulls an octet string out of an ASN octet string type. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   following the beginning of the next object. * *  "string" is filled with the octet string. * *  Returns a pointer to the first byte past the end *   of this object (i.e. the start of the next object). *  Returns NULL on any error. * * u_char * asn_parse_string( *     u_char     *data         IN - pointer to start of object *     int        *datalength   IN/OUT - number of valid bytes left in buffer *     u_char     *type         OUT - asn type of object *     u_char     *string       IN/OUT - pointer to start of output buffer *     int        *strlength    IN/OUT - size of output buffer * * * ASN.1 octet string	::=      primstring | cmpdstring * primstring		::= 0x04 asnlength byte {byte}* * cmpdstring		::= 0x24 asnlength string {string}* */u_char *asn_parse_string(u_char *data,		 size_t *datalength,		 u_char *type,		 u_char *string,		 size_t *strlength){    static const char *errpre = "parse string";    u_char *bufp = data;    u_long  asn_length;    *type = *bufp++;    bufp = asn_parse_length(bufp, &asn_length);    if (_asn_parse_length_check(errpre, bufp, data, asn_length, *datalength))	return NULL;    if ((int)asn_length > *strlength){	_asn_length_err(errpre, (size_t)asn_length, *strlength);	return NULL;    }    DEBUGDUMPSETUP("dump_recv", data, bufp - data + asn_length);    memmove(string, bufp, asn_length);    if (*strlength > (int)asn_length)      string[asn_length] = 0;    *strlength = (int)asn_length;    *datalength -= (int)asn_length + (bufp - data);    DEBUGIF("dump_recv") {      char *buf = (char *)malloc(1+asn_length);      sprint_asciistring(buf, string, asn_length);      DEBUGMSG(("dump_recv", "  ASN String:\t%s\n", buf));      free (buf);    }            return bufp + asn_length;}/* * asn_build_string - Builds an ASN octet string object containing the input string. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   following the beginning of the next object. * *  Returns a pointer to the first byte past the end *   of this object (i.e. the start of the next object). *  Returns NULL on any error.  u_char * asn_build_string(      u_char     *data         IN - pointer to start of object      int        *datalength   IN/OUT - number of valid bytes left in buffer      u_char      type         IN - asn type of object      u_char     *string       IN - pointer to start of input buffer      int         strlength    IN - size of input buffer */u_char *asn_build_string(u_char *data,		 size_t *datalength,		 u_char	type,		 const u_char *string,		 size_t strlength){/* * ASN.1 octet string ::= primstring | cmpdstring * primstring ::= 0x04 asnlength byte {byte}* * cmpdstring ::= 0x24 asnlength string {string}* * This code will never send a compound string. */    data = asn_build_header(data, datalength, type, strlength);    if (_asn_build_header_check("build string", data, *datalength, strlength))	return NULL;    if (strlength) {      if (string == NULL) {	memset(data, 0, strlength);      } else {	memmove(data, string, strlength);      }    }    *datalength -= strlength;    return data + strlength;}/* * asn_parse_header - interprets the ID and length of the current object. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   in this object following the id and length. * *  Returns a pointer to the first byte of the contents of this object. *  Returns NULL on any error.  u_char * asn_parse_header(      u_char     *data         IN - pointer to start of object      int        *datalength   IN/OUT - number of valid bytes left in buffer      u_char     *type         OUT - asn type of object */u_char *asn_parse_header(u_char	*data,		 size_t *datalength,		 u_char	*type){    register u_char *bufp;    u_long	    asn_length;    if (!data || !datalength || !type) {	ERROR_MSG("parse header: NULL pointer");	return NULL;    }    bufp = data;    /* this only works on data types < 30, i.e. no extension octets */    if (IS_EXTENSION_ID(*bufp)){	ERROR_MSG("can't process ID >= 30");	return NULL;    }    *type = *bufp;    bufp = asn_parse_length(bufp + 1, &asn_length);    if (_asn_parse_length_check("parse header", bufp, data, asn_length, *datalength))	return NULL;    DEBUGDUMPSETUP("dump_recv", data, (bufp-data));    DEBUGMSG(("dump_recv", "  ASN Header: 0x%.2X, len = %d (0x%X)\n", *data,              asn_length, asn_length));#ifdef OPAQUE_SPECIAL_TYPES    if ((*type == ASN_OPAQUE) &&        (*bufp == ASN_OPAQUE_TAG1)) {      DEBUGINDENTMORE();      DEBUGDUMPSETUP("dump_recv", data, 1);      DEBUGMSG(("dump_recv", "Opaque:\t%.2x\n", *bufp));      DEBUGINDENTLESS();      /* check if 64-but counter */      switch(*(bufp+1)) {        case ASN_OPAQUE_COUNTER64:        case ASN_OPAQUE_U64:        case ASN_OPAQUE_FLOAT:        case ASN_OPAQUE_DOUBLE:        case ASN_OPAQUE_I64:          *type = *(bufp+1);          break;                default:          /* just an Opaque */          *datalength = (int)asn_length;          return bufp;      }      /* value is encoded as special format */      bufp = asn_parse_length(bufp + 2, &asn_length);      if (_asn_parse_length_check("parse opaque header", bufp, data,                  asn_length, *datalength))        return NULL;    }#endif /* OPAQUE_SPECIAL_TYPES */    *datalength = (int)asn_length;    return bufp;}/* * same as asn_parse_header with test for expected type. */u_char *asn_parse_sequence(u_char	*data,		 size_t *datalength,		 u_char	*type,		 u_char	expected_type, /* must be this type */		 const char *estr)	/* error message prefix */{    data = asn_parse_header(data, datalength, type);    if (data && (*type != expected_type)) {	char ebuf[128];	sprintf(ebuf, "%s header type %02X: s/b %02X", estr,			(u_char)*type, (u_char)expected_type);	ERROR_MSG(ebuf);	return NULL;    }    return data;}/* * asn_build_header - builds an ASN header for an object with the ID and * length specified. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   in this object following the id and length. * *  This only works on data types < 30, i.e. no extension octets. *  The maximum length is 0xFFFF; * *  Returns a pointer to the first byte of the contents of this object. *  Returns NULL on any error.  u_char * asn_build_header(      u_char     *data         IN - pointer to start of object      size_t     *datalength   IN/OUT - number of valid bytes left in buffer      u_char      type         IN - asn type of object      size_t      length       IN - length of object */u_char *asn_build_header (u_char *data,		  size_t *datalength,		  u_char type,		  size_t length){    char ebuf[128];        if (*datalength < 1){	sprintf(ebuf, "bad header length < 1 :%d, %d", *datalength, length);	ERROR_MSG(ebuf);	return NULL;    }	        *data++ = type;    (*datalength)--;    return asn_build_length(data, datalength, length);}/* * asn_build_sequence - builds an ASN header for a sequence with the ID and * length specified. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   in this object following the id and length. * *  This only works on data types < 30, i.e. no extension octets. *  The maximum length is 0xFFFF; * *  Returns a pointer to the first byte of the contents of this object. *  Returns NULL on any error.  u_char * asn_build_sequence(      u_char     *data         IN - pointer to start of object      int        *datalength   IN/OUT - number of valid bytes left in buffer      u_char      type         IN - asn type of object      int         length       IN - length of object */u_char *asn_build_sequence(u_char *data,		  size_t *datalength,		  u_char type,		  size_t length){    static const char *errpre = "build seq";    char ebuf[128];        if (*datalength < 4){	sprintf(ebuf, "%s: length %d < 4: PUNT", errpre, (int)*datalength);	ERROR_MSG(ebuf);	return NULL;    }    *datalength -= 4;    *data++ = type;    *data++ = (u_char)(0x02 | ASN_LONG_LEN);    *data++ = (u_char)((length >> 8) & 0xFF);    *data++ = (u_char)(length & 0xFF);    return data;}/* * asn_parse_length - interprets the length of the current object. *  On exit, length contains the value of this length field. * *  Returns a pointer to the first byte after this length *  field (aka: the start of the data field). *  Returns NULL on any error.  u_char * asn_parse_length(      u_char     *data         IN - pointer to start of length field      u_long     *length       OUT - value of length field */u_char *asn_parse_length(u_char  *data,		 u_long  *length){    static const char *errpre = "parse length";    char ebuf[128];    register u_char lengthbyte;        if (!data || !length) {	ERROR_MSG("parse length: NULL pointer");	return NULL;    }    lengthbyte = *data;    if (lengthbyte & ASN_LONG_LEN){	lengthbyte &= ~ASN_LONG_LEN;	/* turn MSb off */	if (lengthbyte == 0){	    sprintf(ebuf, "%s: indefinite length not supported", errpre);	    ERROR_MSG(ebuf);	    return NULL;	}	if (lengthbyte > sizeof(long)){	    sprintf(ebuf, "%s: data length %d > %d not supported", errpre,                 lengthbyte, sizeof(long));	    ERROR_MSG(ebuf);	    return NULL;	}	data++;	*length = 0;  /* protect against short lengths */	while(lengthbyte--) {		*length <<= 8;		*length |= *data++;	}	return data;    } else { /* short asnlength */	*length = (long)lengthbyte;	return data + 1;    }}/*  u_char * asn_build_length(      u_char     *data         IN - pointer to start of object      int        *datalength   IN/OUT - number of valid bytes left in buffer      int         length       IN - length of object */u_char *asn_build_length(u_char *data,		 size_t *datalength,		 size_t length){    static const char *errpre = "build length";    char ebuf[128];        u_char    *start_data = data;    /* no indefinite lengths sent */    if (length < 0x80){	if (*datalength < 1){	    sprintf(ebuf, "%s: bad length < 1 :%d, %d",errpre,*datalength,length);	    ERROR_MSG(ebuf);	    return NULL;	}	    	*data++ = (u_char)length;    } else if (length <= 0xFF){	if (*datalength < 2){	    sprintf(ebuf, "%s: bad length < 2 :%d, %d",errpre,*datalength,length);	    ERROR_MSG(ebuf);	    return NULL;	}	    	*data++ = (u_char)(0x01 | ASN_LONG_LEN);	*data++ = (u_char)length;    } else { /* 0xFF < length <= 0xFFFF */	if (*datalength < 3){	    sprintf(ebuf, "%s: bad length < 3 :%d, %d",errpre,*datalength,length);	    ERROR_MSG(ebuf);	    return NULL;	}	    	*data++ = (u_char)(0x02 | ASN_LONG_LEN);	*data++ = (u_char)((length >> 8) & 0xFF);	*data++ = (u_char)(length & 0xFF);    }    *datalength -= (data - start_data);    return data;}/* * asn_parse_objid - pulls an object indentifier out of an ASN object identifier type. *  On entry, datalength is input as the number of valid bytes following *   "data".  On exit, it is returned as the number of valid bytes *   following the beginning of the next object. * *  "objid" is filled with the object identifier. * *  Returns a pointer to the first byte past the end *   of this object (i.e. the start of the next object). *  Returns NULL on any error.  u_char * asn_parse_objid(      u_char     *data         IN - pointer to start of object      int        *datalength   IN/OUT - number of valid bytes left in buffer      u_char     *type         OUT - asn type of object      oid        *objid        IN/OUT - pointer to start of output buffer      int        *objidlength  IN/OUT - number of sub-id's in objid */u_char *asn_parse_objid(u_char *data,		size_t *datalength,		u_char *type,			oid *objid,		size_t *objidlength){/* * ASN.1 objid ::= 0x06 asnlength subidentifier {subidentifier}* * subidentifier ::= {leadingbyte}* lastbyte * leadingbyte ::= 1 7bitvalue * lastbyte ::= 0 7bitvalue */    register u_char *bufp = data;    register oid *oidp = objid + 1;    register u_long subidentifier;    register long   length;    u_long	    asn_length;    *type = *bufp++;    bufp = asn_parse_length(bufp, &asn_length);    if (_asn_parse_length_check("parse objid", bufp, data,                    asn_length, *datalength))	return NULL;    *datalength -= (int)asn_length + (bufp - data);    DEBUGDUMPSETUP("dump_recv", data, bufp - data + asn_length);    /* Handle invalid object identifier encodings of the form 06 00 robustly */    if (asn_length == 0)	objid[0] = objid[1] = 0;    length = asn_length;    (*objidlength)--;	/* account for expansion of first byte */    while (length > 0 && (*objidlength)-- > 0){	subidentifier = 0;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1024久久| 一区二区三区中文在线| 国产精品亚洲第一区在线暖暖韩国| 欧美一级日韩免费不卡| 久久99久久99小草精品免视看| 欧美v国产在线一区二区三区| 国产制服丝袜一区| 久久精品视频免费观看| 99v久久综合狠狠综合久久| 亚洲老妇xxxxxx| 欧美精品在线视频| 久久99精品久久久| 亚洲国产电影在线观看| 欧美自拍偷拍午夜视频| 麻豆精品一区二区综合av| 国产亚洲精品7777| 91麻豆福利精品推荐| 天堂一区二区在线| 精品欧美一区二区三区精品久久| 国产不卡视频在线播放| 一区二区日韩电影| 日韩视频免费观看高清完整版 | 99国产精品久久久久| 一区二区欧美在线观看| 精品免费一区二区三区| 99re在线精品| 久久精品国产999大香线蕉| 国产精品亲子伦对白| 欧美日韩中文一区| 国产高清无密码一区二区三区| 亚洲欧美激情小说另类| 欧美哺乳videos| 一本久久a久久精品亚洲| 蜜桃视频一区二区三区| 又紧又大又爽精品一区二区| 欧美精品一区二区三区在线 | 99在线热播精品免费| 首页综合国产亚洲丝袜| 国产精品乱码一区二区三区软件 | 91美女在线视频| 韩国女主播成人在线| 亚洲综合精品久久| 国产精品天美传媒沈樵| 日韩欧美亚洲国产另类| 欧美午夜精品一区| 不卡电影一区二区三区| 精品一区二区三区欧美| 亚洲6080在线| 亚洲人亚洲人成电影网站色| 久久婷婷成人综合色| 欧美日韩国产影片| 91香蕉视频污| 国产91精品一区二区麻豆亚洲| 麻豆精品久久久| 天天影视色香欲综合网老头| 亚洲日本在线看| 欧美激情一区二区三区| 久久亚洲影视婷婷| 这里只有精品免费| 欧美日韩成人高清| 欧美制服丝袜第一页| jlzzjlzz国产精品久久| 国产suv精品一区二区883| 精品一区二区三区久久| 免费精品视频在线| 日韩成人伦理电影在线观看| 亚洲成人一区在线| 亚洲一区二区黄色| 亚洲一区二区免费视频| 亚洲国产色一区| 亚洲国产毛片aaaaa无费看| 亚洲自拍偷拍麻豆| 亚洲电影在线免费观看| 亚洲电影欧美电影有声小说| 亚洲成人一区在线| 午夜欧美视频在线观看| 日韩成人免费在线| 久久国产剧场电影| 韩国v欧美v日本v亚洲v| 国产精品一区免费视频| 国产 日韩 欧美大片| 99久久婷婷国产综合精品| 色综合欧美在线| 欧美日韩在线免费视频| 欧美高清dvd| 精品国产一区二区精华| 国产午夜精品一区二区三区视频| 国产无一区二区| 亚洲同性同志一二三专区| 亚洲靠逼com| 日韩有码一区二区三区| 激情六月婷婷久久| 丁香另类激情小说| bt欧美亚洲午夜电影天堂| 色88888久久久久久影院野外| 色婷婷一区二区三区四区| 欧美片网站yy| 欧美精品一区视频| 亚洲欧美自拍偷拍色图| 亚洲成人手机在线| 国内成人免费视频| 99re免费视频精品全部| 欧美日韩免费一区二区三区| 日韩视频中午一区| 国产精品污污网站在线观看 | 中文字幕av不卡| 亚洲午夜久久久久中文字幕久| 日韩av成人高清| 成人午夜电影久久影院| 欧美午夜免费电影| 337p日本欧洲亚洲大胆色噜噜| 亚洲欧美中日韩| 美国av一区二区| av不卡免费电影| 91精品国产综合久久久久久久| 久久午夜羞羞影院免费观看| 亚洲男人的天堂av| 精品一二三四区| 色老汉一区二区三区| 精品久久人人做人人爽| 一区二区三区四区亚洲| 捆绑调教美女网站视频一区| 91在线国产福利| 亚洲精品一线二线三线无人区| 伊人色综合久久天天| 国产自产高清不卡| 欧美日产国产精品| 国产精品国产三级国产aⅴ无密码| 午夜电影网一区| av毛片久久久久**hd| 日韩欧美一区二区免费| 亚洲黄色免费电影| 高清av一区二区| 欧美老肥妇做.爰bbww| 国产精品久久久久毛片软件| 久久99精品久久久| 欧美日本在线视频| 亚洲精品欧美激情| 成人午夜电影小说| 久久久亚洲午夜电影| 青青草国产精品97视觉盛宴| 色偷偷88欧美精品久久久 | 亚洲免费av高清| 国产成人综合网| 欧美成人国产一区二区| 亚州成人在线电影| 日本大香伊一区二区三区| 中文字幕一区二区三中文字幕| 国产精品白丝av| 精品粉嫩超白一线天av| 蜜臀av一区二区| 欧美高清一级片在线| 亚洲午夜在线电影| 欧美性videosxxxxx| 亚洲综合一区在线| 91成人在线精品| 一区二区三区中文在线观看| 色综合久久久网| 亚洲女与黑人做爰| 91久久精品网| 一区二区三区四区乱视频| 91精品办公室少妇高潮对白| 中文字幕在线观看不卡视频| av在线播放一区二区三区| 中文字幕一区三区| 99久久99久久综合| 中文字幕欧美国产| 91在线精品秘密一区二区| 亚洲三级电影网站| 一本大道久久精品懂色aⅴ| 亚洲激情图片qvod| 欧美亚洲一区二区三区四区| 亚洲精品国产高清久久伦理二区 | 欧美日韩国产一级二级| 亚洲一区二区三区四区在线观看| 色综合久久中文字幕| 亚洲一区视频在线| 91精品国产综合久久精品麻豆| 日韩综合一区二区| 欧美精品一区二区久久婷婷| 精品影院一区二区久久久| 国产人久久人人人人爽| 大尺度一区二区| 亚洲最大成人综合| 91精品国产福利在线观看| 久久99久久久久| 国产区在线观看成人精品| 96av麻豆蜜桃一区二区| 亚洲大片精品永久免费| 精品日韩av一区二区| 国产精品一区一区三区| 亚洲欧美电影一区二区| 欧美一区二区三区播放老司机| 国产真实精品久久二三区| 中文字幕一区二区三区色视频| 欧美日韩午夜在线视频| 狠狠狠色丁香婷婷综合激情| 亚洲视频一区二区在线| 欧美一级免费观看| 国产99久久久国产精品免费看|