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

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

?? bf_lbuf.c

?? OpenSSL 0.9.8k 最新版OpenSSL
?? C
字號:
/* crypto/bio/bf_buff.c *//* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written * by Eric Young (eay@cryptsoft.com). * The implementation was written so as to conform with Netscapes SSL. *  * This library is free for commercial and non-commercial use as long as * the following conditions are aheared to.  The following conditions * apply to all code found in this distribution, be it the RC4, RSA, * lhash, DES, etc., code; not just the SSL code.  The SSL documentation * included with this distribution is covered by the same copyright terms * except that the holder is Tim Hudson (tjh@cryptsoft.com). *  * Copyright remains Eric Young's, and as such any Copyright notices in * the code are not to be removed. * If this package is used in a product, Eric Young should be given attribution * as the author of the parts of the library used. * This can be in the form of a textual message at program startup or * in documentation (online or textual) provided with the package. *  * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *    "This product includes cryptographic software written by *     Eric Young (eay@cryptsoft.com)" *    The word 'cryptographic' can be left out if the rouines from the library *    being used are not cryptographic related :-). * 4. If you include any Windows specific code (or a derivative thereof) from  *    the apps directory (application code) you must include an acknowledgement: *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" *  * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. *  * The licence and distribution terms for any publically available version or * derivative of this code cannot be changed.  i.e. this code cannot simply be * copied and put under another distribution licence * [including the GNU Public Licence.] */#include <stdio.h>#include <errno.h>#include "cryptlib.h"#include <openssl/bio.h>#include <openssl/evp.h>static int linebuffer_write(BIO *h, const char *buf,int num);static int linebuffer_read(BIO *h, char *buf, int size);static int linebuffer_puts(BIO *h, const char *str);static int linebuffer_gets(BIO *h, char *str, int size);static long linebuffer_ctrl(BIO *h, int cmd, long arg1, void *arg2);static int linebuffer_new(BIO *h);static int linebuffer_free(BIO *data);static long linebuffer_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);/* A 10k maximum should be enough for most purposes */#define DEFAULT_LINEBUFFER_SIZE	1024*10/* #define DEBUG */static BIO_METHOD methods_linebuffer=	{	BIO_TYPE_LINEBUFFER,	"linebuffer",	linebuffer_write,	linebuffer_read,	linebuffer_puts,	linebuffer_gets,	linebuffer_ctrl,	linebuffer_new,	linebuffer_free,	linebuffer_callback_ctrl,	};BIO_METHOD *BIO_f_linebuffer(void)	{	return(&methods_linebuffer);	}typedef struct bio_linebuffer_ctx_struct	{	char *obuf;		/* the output char array */	int obuf_size;		/* how big is the output buffer */	int obuf_len;		/* how many bytes are in it */	} BIO_LINEBUFFER_CTX;static int linebuffer_new(BIO *bi)	{	BIO_LINEBUFFER_CTX *ctx;	ctx=(BIO_LINEBUFFER_CTX *)OPENSSL_malloc(sizeof(BIO_LINEBUFFER_CTX));	if (ctx == NULL) return(0);	ctx->obuf=(char *)OPENSSL_malloc(DEFAULT_LINEBUFFER_SIZE);	if (ctx->obuf == NULL) { OPENSSL_free(ctx); return(0); }	ctx->obuf_size=DEFAULT_LINEBUFFER_SIZE;	ctx->obuf_len=0;	bi->init=1;	bi->ptr=(char *)ctx;	bi->flags=0;	return(1);	}static int linebuffer_free(BIO *a)	{	BIO_LINEBUFFER_CTX *b;	if (a == NULL) return(0);	b=(BIO_LINEBUFFER_CTX *)a->ptr;	if (b->obuf != NULL) OPENSSL_free(b->obuf);	OPENSSL_free(a->ptr);	a->ptr=NULL;	a->init=0;	a->flags=0;	return(1);	}	static int linebuffer_read(BIO *b, char *out, int outl)	{	int ret=0; 	if (out == NULL) return(0);	if (b->next_bio == NULL) return(0);	ret=BIO_read(b->next_bio,out,outl);	BIO_clear_retry_flags(b);	BIO_copy_next_retry(b);	return(ret);	}static int linebuffer_write(BIO *b, const char *in, int inl)	{	int i,num=0,foundnl;	BIO_LINEBUFFER_CTX *ctx;	if ((in == NULL) || (inl <= 0)) return(0);	ctx=(BIO_LINEBUFFER_CTX *)b->ptr;	if ((ctx == NULL) || (b->next_bio == NULL)) return(0);	BIO_clear_retry_flags(b);	do		{		const char *p;		for(p = in; p < in + inl && *p != '\n'; p++)			;		if (*p == '\n')			{			p++;			foundnl = 1;			}		else			foundnl = 0;		/* If a NL was found and we already have text in the save		   buffer, concatenate them and write */		while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len)			&& ctx->obuf_len > 0)			{			int orig_olen = ctx->obuf_len;						i = ctx->obuf_size - ctx->obuf_len;			if (p - in > 0)				{				if (i >= p - in)					{					memcpy(&(ctx->obuf[ctx->obuf_len]),						in,p - in);					ctx->obuf_len += p - in;					inl -= p - in;					num += p - in;					in = p;					}				else					{					memcpy(&(ctx->obuf[ctx->obuf_len]),						in,i);					ctx->obuf_len += i;					inl -= i;					in += i;					num += i;					}				}#if 0BIO_write(b->next_bio, "<*<", 3);#endif			i=BIO_write(b->next_bio,				ctx->obuf, ctx->obuf_len);			if (i <= 0)				{				ctx->obuf_len = orig_olen;				BIO_copy_next_retry(b);#if 0BIO_write(b->next_bio, ">*>", 3);#endif				if (i < 0) return((num > 0)?num:i);				if (i == 0) return(num);				}#if 0BIO_write(b->next_bio, ">*>", 3);#endif			if (i < ctx->obuf_len)				memmove(ctx->obuf, ctx->obuf + i,					ctx->obuf_len - i);			ctx->obuf_len-=i;			}		/* Now that the save buffer is emptied, let's write the input		   buffer if a NL was found and there is anything to write. */		if ((foundnl || p - in > ctx->obuf_size) && p - in > 0)			{#if 0BIO_write(b->next_bio, "<*<", 3);#endif			i=BIO_write(b->next_bio,in,p - in);			if (i <= 0)				{				BIO_copy_next_retry(b);#if 0BIO_write(b->next_bio, ">*>", 3);#endif				if (i < 0) return((num > 0)?num:i);				if (i == 0) return(num);				}#if 0BIO_write(b->next_bio, ">*>", 3);#endif			num+=i;			in+=i;			inl-=i;			}		}	while(foundnl && inl > 0);	/* We've written as much as we can.  The rest of the input buffer, if	   any, is text that doesn't and with a NL and therefore needs to be	   saved for the next trip. */	if (inl > 0)		{		memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl);		ctx->obuf_len += inl;		num += inl;		}	return num;	}static long linebuffer_ctrl(BIO *b, int cmd, long num, void *ptr)	{	BIO *dbio;	BIO_LINEBUFFER_CTX *ctx;	long ret=1;	char *p;	int r;	int obs;	ctx=(BIO_LINEBUFFER_CTX *)b->ptr;	switch (cmd)		{	case BIO_CTRL_RESET:		ctx->obuf_len=0;		if (b->next_bio == NULL) return(0);		ret=BIO_ctrl(b->next_bio,cmd,num,ptr);		break;	case BIO_CTRL_INFO:		ret=(long)ctx->obuf_len;		break;	case BIO_CTRL_WPENDING:		ret=(long)ctx->obuf_len;		if (ret == 0)			{			if (b->next_bio == NULL) return(0);			ret=BIO_ctrl(b->next_bio,cmd,num,ptr);			}		break;	case BIO_C_SET_BUFF_SIZE:		obs=(int)num;		p=ctx->obuf;		if ((obs > DEFAULT_LINEBUFFER_SIZE) && (obs != ctx->obuf_size))			{			p=(char *)OPENSSL_malloc((int)num);			if (p == NULL)				goto malloc_error;			}		if (ctx->obuf != p)			{			if (ctx->obuf_len > obs)				{				ctx->obuf_len = obs;				}			memcpy(p, ctx->obuf, ctx->obuf_len);			OPENSSL_free(ctx->obuf);			ctx->obuf=p;			ctx->obuf_size=obs;			}		break;	case BIO_C_DO_STATE_MACHINE:		if (b->next_bio == NULL) return(0);		BIO_clear_retry_flags(b);		ret=BIO_ctrl(b->next_bio,cmd,num,ptr);		BIO_copy_next_retry(b);		break;	case BIO_CTRL_FLUSH:		if (b->next_bio == NULL) return(0);		if (ctx->obuf_len <= 0)			{			ret=BIO_ctrl(b->next_bio,cmd,num,ptr);			break;			}		for (;;)			{			BIO_clear_retry_flags(b);			if (ctx->obuf_len > 0)				{				r=BIO_write(b->next_bio,					ctx->obuf, ctx->obuf_len);#if 0fprintf(stderr,"FLUSH %3d -> %3d\n",ctx->obuf_len,r);#endif				BIO_copy_next_retry(b);				if (r <= 0) return((long)r);				if (r < ctx->obuf_len)					memmove(ctx->obuf, ctx->obuf + r,						ctx->obuf_len - r);				ctx->obuf_len-=r;				}			else				{				ctx->obuf_len=0;				ret=1;				break;				}			}		ret=BIO_ctrl(b->next_bio,cmd,num,ptr);		break;	case BIO_CTRL_DUP:		dbio=(BIO *)ptr;		if (	!BIO_set_write_buffer_size(dbio,ctx->obuf_size))			ret=0;		break;	default:		if (b->next_bio == NULL) return(0);		ret=BIO_ctrl(b->next_bio,cmd,num,ptr);		break;		}	return(ret);malloc_error:	BIOerr(BIO_F_LINEBUFFER_CTRL,ERR_R_MALLOC_FAILURE);	return(0);	}static long linebuffer_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)	{	long ret=1;	if (b->next_bio == NULL) return(0);	switch (cmd)		{	default:		ret=BIO_callback_ctrl(b->next_bio,cmd,fp);		break;		}	return(ret);	}static int linebuffer_gets(BIO *b, char *buf, int size)	{	if (b->next_bio == NULL) return(0);	return(BIO_gets(b->next_bio,buf,size));	}static int linebuffer_puts(BIO *b, const char *str)	{	return(linebuffer_write(b,str,strlen(str)));	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品成人免费| 91麻豆精品国产91久久久久久久久| 欧美xfplay| 国产一区在线观看视频| 久久精品一区二区三区不卡| 国产一区福利在线| 中文字幕高清不卡| 在线日韩av片| 日本欧美一区二区在线观看| 欧美本精品男人aⅴ天堂| 国产一区二区在线电影| 国产精品国产a| 欧美日韩视频专区在线播放| 蜜臀av性久久久久蜜臀aⅴ| 久久久综合九色合综国产精品| 处破女av一区二区| 夜夜精品浪潮av一区二区三区| 91精品婷婷国产综合久久性色| 另类调教123区| 中文字幕在线不卡国产视频| 色综合天天综合网天天狠天天 | 久久免费看少妇高潮| 国产成人在线免费| 一区二区三区视频在线看| 欧美精品一卡两卡| 国产一区二区美女| 伊人一区二区三区| 色婷婷精品大在线视频| 亚洲柠檬福利资源导航| 欧美一区在线视频| 成人av电影免费观看| 亚洲国产精品久久久久婷婷884| 日韩三级视频在线看| 国产福利一区二区三区视频在线 | 国产欧美日韩另类一区| 在线观看成人小视频| 另类的小说在线视频另类成人小视频在线 | 久久久91精品国产一区二区精品| 成人影视亚洲图片在线| 香蕉久久一区二区不卡无毒影院 | 国产 日韩 欧美大片| 性做久久久久久久久| 久久综合色一综合色88| 欧洲一区在线观看| 丁香激情综合国产| 蜜臀av性久久久久蜜臀aⅴ流畅| 1024成人网色www| 日韩精品中文字幕一区二区三区| www.欧美日韩| 九九九精品视频| 亚洲成av人片在线| 亚洲免费av在线| 国产午夜亚洲精品不卡| 91精品国产综合久久福利 | 一区二区在线观看不卡| 久久精品一区二区| 欧美大片一区二区三区| 欧美日韩亚洲综合一区二区三区| 不卡区在线中文字幕| 国产一区二区三区四| 免费一区二区视频| 水野朝阳av一区二区三区| 亚洲精品欧美综合四区| 国产精品久久毛片| 国产精品妹子av| 久久人人爽人人爽| 精品国精品国产| 欧美一级高清大全免费观看| 欧美日韩夫妻久久| 欧美人牲a欧美精品| 日本久久一区二区三区| www.日韩在线| 国产成a人亚洲精品| 久久99久国产精品黄毛片色诱| 丝袜美腿亚洲色图| 日本欧美肥老太交大片| 午夜a成v人精品| 日韩不卡一区二区| 日韩电影网1区2区| 免费精品视频最新在线| 日韩精品每日更新| 欧美久久一二三四区| 久久99热这里只有精品| 天堂午夜影视日韩欧美一区二区| 亚洲宅男天堂在线观看无病毒| 国产精品理论片| 亚洲乱码国产乱码精品精的特点| 亚洲天堂免费在线观看视频| 国产精品久久久一本精品 | 1区2区3区欧美| 亚洲三级视频在线观看| 亚洲另类在线制服丝袜| 亚洲图片有声小说| 天堂久久一区二区三区| 日韩av一区二| 国产一区二区三区在线观看免费视频| 黄一区二区三区| 成人午夜在线免费| 色综合久久久久综合| 欧美性大战久久久久久久| 欧美日韩国产美| 日韩视频在线一区二区| 久久嫩草精品久久久精品一| 亚洲国产精品国自产拍av| 一区二区三区国产豹纹内裤在线| 亚洲高清久久久| 韩国成人福利片在线播放| 国产精品一区二区不卡| 91丨porny丨国产入口| 欧美日韩免费一区二区三区| 精品国产99国产精品| 中文字幕一区二区日韩精品绯色| 亚洲国产一二三| 国内偷窥港台综合视频在线播放| av一本久道久久综合久久鬼色| 欧美日韩视频不卡| 国产女人18水真多18精品一级做| 亚洲美女免费在线| 六月丁香婷婷久久| 99这里只有久久精品视频| 欧美久久久久久久久中文字幕| 久久午夜羞羞影院免费观看| 亚洲黄色免费网站| 国产一区二区在线视频| 欧美亚洲动漫精品| 国产视频911| 亚洲不卡在线观看| 99视频精品在线| 欧美大片国产精品| 亚洲一区在线免费观看| 国产成人99久久亚洲综合精品| 欧美丝袜丝交足nylons| 日本一区二区三区免费乱视频| 婷婷开心久久网| 91蜜桃在线免费视频| 精品精品国产高清一毛片一天堂| 人人狠狠综合久久亚洲| 欧美最新大片在线看| 久久久影视传媒| 婷婷中文字幕一区三区| 91视频com| 中文字幕乱码一区二区免费| 欧美a一区二区| 91福利小视频| 国产校园另类小说区| 美女视频第一区二区三区免费观看网站 | 欧美午夜在线观看| 国产精品久久久久7777按摩| 免费精品99久久国产综合精品| 在线欧美日韩精品| 亚洲欧美激情一区二区| 国产福利不卡视频| 欧美精品一区二区三区在线| 日日噜噜夜夜狠狠视频欧美人| 91麻豆精品在线观看| 国产午夜亚洲精品午夜鲁丝片| 开心九九激情九九欧美日韩精美视频电影 | 欧美一区二区黄色| 五月激情丁香一区二区三区| 99在线精品一区二区三区| 国产亚洲福利社区一区| 韩国精品主播一区二区在线观看| 制服丝袜国产精品| 午夜av一区二区| 欧美日韩视频在线一区二区| 亚洲一区二区欧美| 欧美三级韩国三级日本一级| 中文字幕综合网| 91看片淫黄大片一级在线观看| 国产网红主播福利一区二区| 韩国欧美国产一区| 久久午夜国产精品| 粉嫩av一区二区三区在线播放| 欧美精品一区二区在线观看| 国产一区二区三区日韩| 久久精品欧美日韩| 大胆亚洲人体视频| 亚洲另类色综合网站| 91国内精品野花午夜精品| 欧美一级生活片| 精品系列免费在线观看| 成人美女视频在线看| 国产精品久久福利| 欧美性猛交xxxxxx富婆| 午夜国产精品一区| 欧美va亚洲va在线观看蝴蝶网| 久草这里只有精品视频| 久久久久久久久99精品| youjizz久久| 亚洲国产欧美日韩另类综合| 777午夜精品视频在线播放| 免费观看一级欧美片| 久久女同性恋中文字幕| 91在线一区二区| 午夜精品久久久久久久久久 | 国产精品久久午夜| 日本韩国欧美一区| 美日韩一区二区| 综合欧美亚洲日本| 91精品国产综合久久香蕉麻豆|