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

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

?? rand_egd.c

?? openssl包含TLS
?? C
字號:
/* crypto/rand/rand_egd.c *//* Written by Ulf Moeller and Lutz Jaenicke for the OpenSSL project. *//* ==================================================================== * Copyright (c) 1998-2000 The OpenSSL Project.  All rights reserved. * * 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 above 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 acknowledgment: *    "This product includes software developed by the OpenSSL Project *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)" * * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to *    endorse or promote products derived from this software without *    prior written permission. For written permission, please contact *    openssl-core@openssl.org. * * 5. Products derived from this software may not be called "OpenSSL" *    nor may "OpenSSL" appear in their names without prior written *    permission of the OpenSSL Project. * * 6. Redistributions of any form whatsoever must retain the following *    acknowledgment: *    "This product includes software developed by the OpenSSL Project *    for use in the OpenSSL Toolkit (http://www.openssl.org/)" * * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY * EXPRESSED 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 OpenSSL PROJECT OR * ITS 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. * ==================================================================== * * This product includes cryptographic software written by Eric Young * (eay@cryptsoft.com).  This product includes software written by Tim * Hudson (tjh@cryptsoft.com). * */#include <openssl/e_os2.h>#include <openssl/rand.h>#include <openssl/buffer.h>/* * Query the EGD <URL: http://www.lothar.com/tech/crypto/>. * * This module supplies three routines: * * RAND_query_egd_bytes(path, buf, bytes) *   will actually query "bytes" bytes of entropy form the egd-socket located *   at path and will write them to buf (if supplied) or will directly feed *   it to RAND_seed() if buf==NULL. *   The number of bytes is not limited by the maximum chunk size of EGD, *   which is 255 bytes. If more than 255 bytes are wanted, several chunks *   of entropy bytes are requested. The connection is left open until the *   query is competed. *   RAND_query_egd_bytes() returns with *     -1  if an error occured during connection or communication. *     num the number of bytes read from the EGD socket. This number is either *         the number of bytes requested or smaller, if the EGD pool is *         drained and the daemon signals that the pool is empty. *   This routine does not touch any RAND_status(). This is necessary, since *   PRNG functions may call it during initialization. * * RAND_egd_bytes(path, bytes) will query "bytes" bytes and have them *   used to seed the PRNG. *   RAND_egd_bytes() is a wrapper for RAND_query_egd_bytes() with buf=NULL. *   Unlike RAND_query_egd_bytes(), RAND_status() is used to test the *   seed status so that the return value can reflect the seed state: *     -1  if an error occured during connection or communication _or_ *         if the PRNG has still not received the required seeding. *     num the number of bytes read from the EGD socket. This number is either *         the number of bytes requested or smaller, if the EGD pool is *         drained and the daemon signals that the pool is empty. * * RAND_egd(path) will query 255 bytes and use the bytes retreived to seed *   the PRNG. *   RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255. */#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_VOS)int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)	{	return(-1);	}int RAND_egd(const char *path)	{	return(-1);	}int RAND_egd_bytes(const char *path,int bytes)	{	return(-1);	}#else#include <openssl/opensslconf.h>#include OPENSSL_UNISTD#include <sys/types.h>#include <sys/socket.h>#ifndef NO_SYS_UN_H# ifdef OPENSSL_SYS_VXWORKS#   include <streams/un.h># else#   include <sys/un.h># endif#elsestruct	sockaddr_un {	short	sun_family;		/* AF_UNIX */	char	sun_path[108];		/* path name (gag) */};#endif /* NO_SYS_UN_H */#include <string.h>#include <errno.h>#ifndef offsetof#  define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)#endifint RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)	{	int ret = 0;	struct sockaddr_un addr;	int len, num, numbytes;	int fd = -1;	int success;	unsigned char egdbuf[2], tempbuf[255], *retrievebuf;	memset(&addr, 0, sizeof(addr));	addr.sun_family = AF_UNIX;	if (strlen(path) >= sizeof(addr.sun_path))		return (-1);	BUF_strlcpy(addr.sun_path,path,sizeof addr.sun_path);	len = offsetof(struct sockaddr_un, sun_path) + strlen(path);	fd = socket(AF_UNIX, SOCK_STREAM, 0);	if (fd == -1) return (-1);	success = 0;	while (!success)	    {	    if (connect(fd, (struct sockaddr *)&addr, len) == 0)	       success = 1;	    else		{		switch (errno)		    {#ifdef EINTR		    case EINTR:#endif#ifdef EAGAIN		    case EAGAIN:#endif#ifdef EINPROGRESS		    case EINPROGRESS:#endif#ifdef EALREADY		    case EALREADY:#endif			/* No error, try again */			break;#ifdef EISCONN		    case EISCONN:			success = 1;			break;#endif		    default:			goto err;	/* failure */		    }		}	    }	while(bytes > 0)	    {	    egdbuf[0] = 1;	    egdbuf[1] = bytes < 255 ? bytes : 255;	    numbytes = 0;	    while (numbytes != 2)		{	        num = write(fd, egdbuf + numbytes, 2 - numbytes);	        if (num >= 0)		    numbytes += num;	    	else		    {		    switch (errno)		    	{#ifdef EINTR		    	case EINTR:#endif#ifdef EAGAIN		    	case EAGAIN:#endif			    /* No error, try again */			    break;		    	default:			    ret = -1;			    goto err;	/* failure */			}		    }		}	    numbytes = 0;	    while (numbytes != 1)		{	        num = read(fd, egdbuf, 1);	        if (num == 0)			goto err;	/* descriptor closed */		else if (num > 0)		    numbytes += num;	    	else		    {		    switch (errno)		    	{#ifdef EINTR		    	case EINTR:#endif#ifdef EAGAIN		    	case EAGAIN:#endif			    /* No error, try again */			    break;		    	default:			    ret = -1;			    goto err;	/* failure */			}		    }		}	    if(egdbuf[0] == 0)		goto err;	    if (buf)		retrievebuf = buf + ret;	    else		retrievebuf = tempbuf;	    numbytes = 0;	    while (numbytes != egdbuf[0])		{	        num = read(fd, retrievebuf + numbytes, egdbuf[0] - numbytes);		if (num == 0)			goto err;	/* descriptor closed */	        else if (num > 0)		    numbytes += num;	    	else		    {		    switch (errno)		    	{#ifdef EINTR		    	case EINTR:#endif#ifdef EAGAIN		    	case EAGAIN:#endif			    /* No error, try again */			    break;		    	default:			    ret = -1;			    goto err;	/* failure */			}		    }		}	    ret += egdbuf[0];	    bytes -= egdbuf[0];	    if (!buf)		RAND_seed(tempbuf, egdbuf[0]);	    } err:	if (fd != -1) close(fd);	return(ret);	}int RAND_egd_bytes(const char *path, int bytes)	{	int num, ret = 0;	num = RAND_query_egd_bytes(path, NULL, bytes);	if (num < 1) goto err;	if (RAND_status() == 1)	    ret = num; err:	return(ret);	}int RAND_egd(const char *path)	{	return (RAND_egd_bytes(path, 255));	}#endif

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩美女视频一区二区在线观看| 日韩一级精品视频在线观看| 日韩av电影免费观看高清完整版| 久久在线免费观看| 欧美日韩视频在线第一区| 成人综合激情网| 天堂午夜影视日韩欧美一区二区| 国产人成亚洲第一网站在线播放| 欧美精品一二三区| 色爱区综合激月婷婷| 国产一区二区91| 蜜桃在线一区二区三区| 亚洲一区二区av电影| 亚洲欧美日韩国产一区二区三区| 久久久99精品免费观看| 日韩一区二区三区视频在线观看| 色综合天天综合狠狠| 风间由美性色一区二区三区| 老司机一区二区| 五月婷婷综合激情| 一卡二卡欧美日韩| 亚洲欧洲99久久| 国产精品久久国产精麻豆99网站| 久久欧美一区二区| 精品国产免费视频| 欧美一卡在线观看| 3d动漫精品啪啪一区二区竹菊| 91免费国产视频网站| av福利精品导航| 丁香另类激情小说| 国产一区二区久久| 精品一区二区三区视频在线观看| 日本伊人色综合网| 午夜精品成人在线视频| 亚洲国产精品久久一线不卡| 亚洲色图一区二区| 亚洲欧美另类小说视频| 中文字幕色av一区二区三区| 中文字幕不卡的av| 国产精品欧美经典| 国产精品天美传媒沈樵| 国产女同互慰高潮91漫画| 久久丝袜美腿综合| 久久久久99精品一区| 精品国产乱码久久久久久夜甘婷婷| 欧美一区二区在线免费播放| 91精品国产乱| 日韩美一区二区三区| 日韩精品在线看片z| 欧美大胆一级视频| 欧美精品一区二区久久婷婷| 久久久久国产免费免费| 中文字幕国产精品一区二区| 18欧美亚洲精品| 亚洲精品国产精华液| 一区二区三区av电影| 亚洲国产三级在线| 日本不卡一区二区| 国产毛片精品视频| 成人免费视频免费观看| 91免费精品国自产拍在线不卡| 在线看国产一区| 欧美精品三级在线观看| 日韩欧美国产精品| 亚洲国产精品99久久久久久久久| 日韩一区中文字幕| 香蕉久久夜色精品国产使用方法| 老色鬼精品视频在线观看播放| 国产成人亚洲综合色影视| 99久久亚洲一区二区三区青草| 91福利国产成人精品照片| 3d成人动漫网站| 国产清纯在线一区二区www| 亚洲天天做日日做天天谢日日欢| 午夜精品一区二区三区三上悠亚| 免费成人在线视频观看| 成人精品视频一区| 欧美日韩在线电影| 久久这里只有精品首页| 亚洲人成网站影音先锋播放| 日韩精品成人一区二区在线| 国产精品资源网| 91农村精品一区二区在线| 在线播放国产精品二区一二区四区 | 亚洲第一福利一区| 国产在线播放一区| 欧美在线高清视频| wwww国产精品欧美| 一区二区三区国产| 国产成人av在线影院| 在线看国产日韩| 久久久国产精华| 丝袜美腿亚洲色图| av网站免费线看精品| 91精品免费在线观看| 中文字幕一区在线观看视频| 免费在线观看成人| 在线精品国精品国产尤物884a | 亚洲激情网站免费观看| 麻豆精品视频在线观看视频| 在线看一区二区| 中文在线一区二区| 麻豆国产精品一区二区三区 | 亚洲h在线观看| 成人av动漫在线| 2023国产一二三区日本精品2022| 亚洲一区二区偷拍精品| 成人午夜碰碰视频| 日韩精品一区二区三区三区免费| 亚洲综合无码一区二区| 成人动漫在线一区| 2019国产精品| 日韩精品视频网站| 色呦呦一区二区三区| 中文字幕欧美日韩一区| 久久国产精品99久久人人澡| 欧美日韩日日摸| 一区二区三区av电影| 99riav一区二区三区| 久久精品亚洲一区二区三区浴池 | 日本最新不卡在线| 欧洲av一区二区嗯嗯嗯啊| 综合在线观看色| www.欧美日韩| 国产精品色哟哟| 国产在线视频一区二区| 日韩精品一区二区在线观看| 青青草国产精品97视觉盛宴| 欧美视频在线观看一区二区| 亚洲免费看黄网站| 一本大道久久a久久精二百| 国产精品午夜久久| 国产 日韩 欧美大片| 久久久99精品免费观看| 国产一区二区按摩在线观看| www一区二区| 国产成人免费高清| 中文字幕av资源一区| av欧美精品.com| 亚洲天堂福利av| 91免费精品国自产拍在线不卡| 成人欧美一区二区三区小说 | 99免费精品视频| 成人欧美一区二区三区小说| 91日韩一区二区三区| 亚洲综合成人在线视频| 欧美在线综合视频| 亚洲v中文字幕| 欧美一级理论片| 国内精品伊人久久久久影院对白| 久久亚区不卡日本| 粉嫩蜜臀av国产精品网站| 国产精品电影一区二区| aaa欧美大片| 亚洲综合久久久| 7777精品伊人久久久大香线蕉经典版下载 | 欧美亚一区二区| 免费成人美女在线观看| 久久综合中文字幕| 成人黄色av电影| 亚洲日本在线天堂| 欧美日韩精品三区| 久久av中文字幕片| 国产精品无遮挡| 欧美视频一区在线观看| 久久国产三级精品| 国产精品国产三级国产| 欧美性色黄大片手机版| 欧美aaaaa成人免费观看视频| 26uuu亚洲综合色| 91视频在线看| 日本午夜一本久久久综合| xf在线a精品一区二区视频网站| av日韩在线网站| 日韩精品亚洲一区| 欧美激情一区三区| 欧美日韩精品免费观看视频| 激情六月婷婷久久| 综合色天天鬼久久鬼色| 欧美人狂配大交3d怪物一区| 国产一区二区三区蝌蚪| 一区二区三区色| 久久一日本道色综合| 91日韩精品一区| 国产自产v一区二区三区c| 亚洲免费观看高清完整版在线| 91精品在线一区二区| 成人教育av在线| 秋霞av亚洲一区二区三| 国产精品系列在线| 欧美一级视频精品观看| 99视频国产精品| 韩日av一区二区| 亚洲一区二区三区爽爽爽爽爽| 久久久久久亚洲综合影院红桃 | 成人免费毛片高清视频| 天堂成人国产精品一区| 国产精品白丝在线| 精品国产一区二区三区四区四| 欧美午夜免费电影|