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

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

?? randfile.c

?? openssl包含TLS
?? C
字號:
/* crypto/rand/randfile.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.] *//* We need to define this to get macros like S_IFBLK and S_IFCHR */#define _XOPEN_SOURCE 500#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include "e_os.h"#include <openssl/crypto.h>#include <openssl/rand.h>#include <openssl/buffer.h>#ifdef OPENSSL_SYS_VMS#include <unixio.h>#endif#ifndef NO_SYS_TYPES_H# include <sys/types.h>#endif#ifdef MAC_OS_pre_X# include <stat.h>#else# include <sys/stat.h>#endif#undef BUFSIZE#define BUFSIZE	1024#define RAND_DATA 1024/* #define RFILE ".rnd" - defined in ../../e_os.h *//* Note that these functions are intended for seed files only. * Entropy devices and EGD sockets are handled in rand_unix.c */int RAND_load_file(const char *file, long bytes)	{	/* If bytes >= 0, read up to 'bytes' bytes.	 * if bytes == -1, read complete file. */	MS_STATIC unsigned char buf[BUFSIZE];	struct stat sb;	int i,ret=0,n;	FILE *in;	if (file == NULL) return(0);	i=stat(file,&sb);	/* If the state fails, put some crap in anyway */	RAND_add(&sb,sizeof(sb),0);	if (i < 0) return(0);	if (bytes == 0) return(ret);	in=fopen(file,"rb");	if (in == NULL) goto err;#if defined(S_IFBLK) && defined(S_IFCHR)	if (sb.st_mode & (S_IFBLK | S_IFCHR)) {	  /* this file is a device. we don't want read an infinite number	   * of bytes from a random device, nor do we want to use buffered	   * I/O because we will waste system entropy. 	   */	  bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */	  setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */	}#endif	for (;;)		{		if (bytes > 0)			n = (bytes < BUFSIZE)?(int)bytes:BUFSIZE;		else			n = BUFSIZE;		i=fread(buf,1,n,in);		if (i <= 0) break;		/* even if n != i, use the full array */		RAND_add(buf,n,i);		ret+=i;		if (bytes > 0)			{			bytes-=n;			if (bytes <= 0) break;			}		}	fclose(in);	OPENSSL_cleanse(buf,BUFSIZE);err:	return(ret);	}int RAND_write_file(const char *file)	{	unsigned char buf[BUFSIZE];	int i,ret=0,rand_err=0;	FILE *out = NULL;	int n;	struct stat sb;		i=stat(file,&sb);	if (i != -1) { #if defined(S_IFBLK) && defined(S_IFCHR)	  if (sb.st_mode & (S_IFBLK | S_IFCHR)) {	    /* this file is a device. we don't write back to it. 	     * we "succeed" on the assumption this is some sort 	     * of random device. Otherwise attempting to write to 	     * and chmod the device causes problems.	     */	    return(1); 	  }#endif	}#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)	{	/* For some reason Win32 can't write to files created this way */		/* chmod(..., 0600) is too late to protect the file,	 * permissions should be restrictive from the start */	int fd = open(file, O_CREAT, 0600);	if (fd != -1)		out = fdopen(fd, "wb");	}#endif	if (out == NULL)		out = fopen(file,"wb");	if (out == NULL) goto err;#ifndef NO_CHMOD	chmod(file,0600);#endif	n=RAND_DATA;	for (;;)		{		i=(n > BUFSIZE)?BUFSIZE:n;		n-=BUFSIZE;		if (RAND_bytes(buf,i) <= 0)			rand_err=1;		i=fwrite(buf,1,i,out);		if (i <= 0)			{			ret=0;			break;			}		ret+=i;		if (n <= 0) break;                }#ifdef OPENSSL_SYS_VMS	/* Try to delete older versions of the file, until there aren't	   any */	{	char *tmpf;	tmpf = OPENSSL_malloc(strlen(file) + 4);  /* to add ";-1" and a nul */	if (tmpf)		{		strcpy(tmpf, file);		strcat(tmpf, ";-1");		while(delete(tmpf) == 0)			;		rename(file,";1"); /* Make sure it's version 1, or we				      will reach the limit (32767) at				      some point... */		}	}#endif /* OPENSSL_SYS_VMS */	fclose(out);	OPENSSL_cleanse(buf,BUFSIZE);err:	return (rand_err ? -1 : ret);	}const char *RAND_file_name(char *buf, size_t size)	{	char *s=NULL;	int ok = 0;#ifdef __OpenBSD__	struct stat sb;#endif	if (OPENSSL_issetugid() == 0)		s=getenv("RANDFILE");	if (s != NULL && *s && strlen(s) + 1 < size)		{		if (BUF_strlcpy(buf,s,size) >= size)			return NULL;		}	else		{		if (OPENSSL_issetugid() == 0)			s=getenv("HOME");#ifdef DEFAULT_HOME		if (s == NULL)			{			s = DEFAULT_HOME;			}#endif		if (s && *s && strlen(s)+strlen(RFILE)+2 < size)			{			BUF_strlcpy(buf,s,size);#ifndef OPENSSL_SYS_VMS			BUF_strlcat(buf,"/",size);#endif			BUF_strlcat(buf,RFILE,size);			ok = 1;			}		else		  	buf[0] = '\0'; /* no file name */		}#ifdef __OpenBSD__	/* given that all random loads just fail if the file can't be 	 * seen on a stat, we stat the file we're returning, if it	 * fails, use /dev/arandom instead. this allows the user to 	 * use their own source for good random data, but defaults	 * to something hopefully decent if that isn't available. 	 */	if (!ok)		if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) {			return(NULL);		}		if (stat(buf,&sb) == -1)		if (BUF_strlcpy(buf,"/dev/arandom",size) >= size) {			return(NULL);		}	#endif	return(buf);	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美高清视频一二三区| 国产精品毛片高清在线完整版| av爱爱亚洲一区| 国产99久久久国产精品免费看| 蜜臀久久99精品久久久久久9| 亚洲成人一区在线| 精品国产一区二区亚洲人成毛片| 欧美视频精品在线观看| 色视频一区二区| 91欧美激情一区二区三区成人| 国产精品1区二区.| 日韩不卡免费视频| 日韩精品三区四区| 天堂成人国产精品一区| 亚洲国产日韩综合久久精品| 亚洲另类一区二区| 国产精品五月天| 欧美韩国日本一区| 国产精品美女久久久久久久| 亚洲国产高清在线观看视频| 国产午夜亚洲精品理论片色戒| 2欧美一区二区三区在线观看视频| 欧美亚洲一区二区在线| 国产成人亚洲综合a∨婷婷| 日韩电影在线一区二区三区| 一个色综合av| 日韩—二三区免费观看av| 综合亚洲深深色噜噜狠狠网站| 精品成人一区二区| 中文字幕av免费专区久久| 国产亚洲综合在线| 自拍偷拍欧美激情| 中文字幕一区二区三区在线播放| 国产精品污网站| 国产精品乱码人人做人人爱 | 亚洲一区在线视频| 偷拍亚洲欧洲综合| 狠狠色丁香久久婷婷综| 国产精品1024| 99九九99九九九视频精品| 欧美亚洲动漫制服丝袜| 欧美日韩免费高清一区色橹橹| 欧美日韩电影在线| 2021久久国产精品不只是精品| 久久久电影一区二区三区| 综合色天天鬼久久鬼色| 视频一区中文字幕国产| 国产在线国偷精品免费看| 蜜桃久久久久久| 国产传媒欧美日韩成人| 色成人在线视频| 欧美精品免费视频| 久久免费视频色| 亚洲精品国久久99热| 奇米精品一区二区三区在线观看 | 日韩**一区毛片| 国产.精品.日韩.另类.中文.在线.播放| 99久久久久免费精品国产| 欧美久久久久久久久久| 久久久久久影视| 亚洲激情中文1区| 九色|91porny| 色综合色狠狠综合色| 欧美一区二区福利视频| 国产精品久久毛片av大全日韩| 亚洲第一福利视频在线| 久久99国产精品免费网站| 日韩成人免费电影| 国产原创一区二区三区| 成人精品gif动图一区| 色一情一伦一子一伦一区| 日韩片之四级片| 亚洲男人的天堂在线aⅴ视频| 日韩av网站在线观看| 国产一区二区三区黄视频 | 欧美α欧美αv大片| 最新成人av在线| 久久成人精品无人区| 一本久久a久久精品亚洲| 欧美不卡一区二区| 亚洲成av人片在线| 国产九色精品成人porny| 欧美自拍偷拍午夜视频| 久久精品夜夜夜夜久久| 亚洲高清视频的网址| 国产一区在线看| 欧美人牲a欧美精品| 精品国产一区二区三区不卡| 一区二区三区在线影院| 成人免费视频视频| 精品免费99久久| 视频一区视频二区中文| 91麻豆精品在线观看| 亚洲精品在线免费播放| 日韩va亚洲va欧美va久久| 色偷偷久久一区二区三区| 久久婷婷久久一区二区三区| 亚洲另类春色国产| 久久精品久久综合| 欧美日韩精品一区二区三区四区 | 玉足女爽爽91| 成人app在线| 国产欧美日本一区二区三区| 久久99精品一区二区三区三区| 欧美日本一区二区在线观看| 国产精品进线69影院| 狠狠色伊人亚洲综合成人| 欧美一级在线免费| 欧美精三区欧美精三区| 国产精品网站导航| 亚洲裸体在线观看| 国产经典欧美精品| 色综合一区二区| 自拍偷拍欧美激情| 国产精品麻豆一区二区 | 亚洲一区二区三区中文字幕| 亚洲高清视频在线| www.欧美精品一二区| 精品精品国产高清一毛片一天堂| 亚洲激情男女视频| 国产一区视频导航| 色综合亚洲欧洲| 国产精品私房写真福利视频| 国产伦精品一区二区三区免费 | 精品国产免费久久| 亚洲欧洲日产国产综合网| 国产精品二三区| 亚洲无人区一区| 一区二区视频免费在线观看| 成人精品免费看| 一本到不卡免费一区二区| 专区另类欧美日韩| 亚洲h精品动漫在线观看| 欧美日韩精品免费| 欧美一区二区福利在线| 久久国产麻豆精品| 国产suv精品一区二区三区| 国产清纯白嫩初高生在线观看91 | 亚洲精品国产无天堂网2021| 韩国毛片一区二区三区| 欧美性猛交xxxxxxxx| 欧美变态tickling挠脚心| 日韩中文字幕麻豆| 欧美精品一区二区三区在线播放| 国产精品白丝av| 4438x亚洲最大成人网| 亚洲va欧美va人人爽| 91毛片在线观看| 亚洲成人第一页| 精品欧美一区二区在线观看| 成人免费毛片app| 色吊一区二区三区 | 一区二区在线免费观看| 波多野结衣在线一区| 欧美三级在线播放| 婷婷综合另类小说色区| av在线播放成人| 亚洲国产精品一区二区久久恐怖片 | av亚洲精华国产精华精| 亚洲夂夂婷婷色拍ww47| 日韩精品一区二区三区在线| 激情综合网最新| 亚洲裸体在线观看| 久久精品亚洲精品国产欧美kt∨| 99国产精品99久久久久久| 精品一区二区三区视频| 国产精品久久久久久久浪潮网站| 在线不卡一区二区| 99re这里只有精品6| 亚洲在线观看免费视频| 国产欧美日韩麻豆91| 欧美剧情片在线观看| 91啦中文在线观看| 国产在线视频精品一区| 亚洲国产一区二区三区 | 夜夜揉揉日日人人青青一国产精品| 欧美视频三区在线播放| caoporen国产精品视频| 奇米影视7777精品一区二区| 亚洲婷婷综合色高清在线| 欧美一区二区三区在线| 欧美综合天天夜夜久久| 国产精品一二三区| 亚洲伦理在线精品| 国产亚洲成av人在线观看导航| 色网站国产精品| 成人精品国产一区二区4080| 毛片av一区二区| 婷婷国产v国产偷v亚洲高清| 国产精品污网站| 国产欧美精品一区二区色综合| 欧美一区二区三区婷婷月色 | 久久一夜天堂av一区二区三区| 在线看不卡av| 99精品热视频| 成人综合在线观看| 日韩福利视频导航| 亚洲国产精品麻豆| 国产精品久久一卡二卡| 欧美激情一区二区三区全黄|