您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ CRYPTO_thread_id函数代码示例

51自学网 2021-06-01 20:05:56
  C++
这篇教程C++ CRYPTO_thread_id函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中CRYPTO_thread_id函数的典型用法代码示例。如果您正苦于以下问题:C++ CRYPTO_thread_id函数的具体用法?C++ CRYPTO_thread_id怎么用?C++ CRYPTO_thread_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了CRYPTO_thread_id函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: pthreads_locking_callback

void pthreads_locking_callback(int mode, int type, char *file,	     int line)      {#if 0	TINYCLR_SSL_FPRINTF(OPENSSL_TYPE__FILE_STDERR,"thread=%4d mode=%s lock=%s %s:%d/n",		CRYPTO_thread_id(),		(mode&CRYPTO_LOCK)?"l":"u",		(type&CRYPTO_READ)?"r":"w",file,line);#endif#if 0	if (CRYPTO_LOCK_SSL_CERT == type)		TINYCLR_SSL_FPRINTF(OPENSSL_TYPE__FILE_STDERR,"(t,m,f,l) %ld %d %s %d/n",		CRYPTO_thread_id(),		mode,file,line);#endif	if (mode & CRYPTO_LOCK)		{		pthread_mutex_lock(&(lock_cs[type]));		lock_count[type]++;		}	else		{		pthread_mutex_unlock(&(lock_cs[type]));		}	}
开发者ID:AustinWise,项目名称:Netduino-Micro-Framework,代码行数:25,


示例2: pthreads_locking_callback

void pthreads_locking_callback(int mode, int type, char *file,	     int line)      {#if 0	fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d/n",		CRYPTO_thread_id(),		(mode&CRYPTO_LOCK)?"l":"u",		(type&CRYPTO_READ)?"r":"w",file,line);#endif#if 0	if (CRYPTO_LOCK_SSL_CERT == type)		fprintf(stderr,"(t,m,f,l) %ld %d %s %d/n",		CRYPTO_thread_id(),		mode,file,line);#endif	if (mode & CRYPTO_LOCK)		{		pthread_mutex_lock(&(lock_cs[type]));		lock_count[type]++;		}	else		{		pthread_mutex_unlock(&(lock_cs[type]));		}	}
开发者ID:ayufan,项目名称:openssl-win32,代码行数:25,


示例3: solaris_locking_callback

void solaris_locking_callback(int mode, int type, char *file, int line){# ifdef undef    fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d/n",            CRYPTO_thread_id(),            (mode & CRYPTO_LOCK) ? "l" : "u",            (type & CRYPTO_READ) ? "r" : "w", file, line);# endif    /*-    if (CRYPTO_LOCK_SSL_CERT == type)    fprintf(stderr,"(t,m,f,l) %ld %d %s %d/n",            CRYPTO_thread_id(),            mode,file,line);    */    if (mode & CRYPTO_LOCK) {        /*-        if (mode & CRYPTO_READ)                rw_rdlock(&(lock_cs[type]));        else                rw_wrlock(&(lock_cs[type])); */        mutex_lock(&(lock_cs[type]));        lock_count[type]++;    } else {/*      rw_unlock(&(lock_cs[type]));  */        mutex_unlock(&(lock_cs[type]));    }}
开发者ID:johnjohnsp1,项目名称:opensgx,代码行数:29,


示例4: CRYPTO_lock

void CRYPTO_lock(int mode, int type, const char *file, int line)	{#ifdef LOCK_DEBUG		{		char *rw_text,*operation_text;		if (mode & CRYPTO_LOCK)			operation_text="lock  ";		else if (mode & CRYPTO_UNLOCK)			operation_text="unlock";		else			operation_text="ERROR ";		if (mode & CRYPTO_READ)			rw_text="r";		else if (mode & CRYPTO_WRITE)			rw_text="w";		else			rw_text="ERROR";		fprintf(stderr,"lock:%08lx:(%s)%s %-18s %s:%d/n",			CRYPTO_thread_id(), rw_text, operation_text,			CRYPTO_get_lock_name(type), file, line);		}#endif	if (type < 0)		{		if (do_dynlock_cb)			do_dynlock_cb(mode, type, file, line);		}	else		if (locking_callback != NULL)			locking_callback(mode,type,file,line);	}
开发者ID:SRI-CSL,项目名称:ENCODERS,代码行数:34,


示例5: CRYPTO_r_lock

static BN_BLINDING *rsa_get_blinding(RSA *rsa, int *local, BN_CTX *ctx){	BN_BLINDING *ret;	int got_write_lock = 0;	CRYPTO_r_lock(CRYPTO_LOCK_RSA);	if (rsa->blinding == NULL)		{		CRYPTO_r_unlock(CRYPTO_LOCK_RSA);		CRYPTO_w_lock(CRYPTO_LOCK_RSA);		got_write_lock = 1;		if (rsa->blinding == NULL)			rsa->blinding = RSA_setup_blinding(rsa, ctx);		}	ret = rsa->blinding;	if (ret == NULL)		goto err;	if (BN_BLINDING_get_thread_id(ret) == CRYPTO_thread_id())		{		/* rsa->blinding is ours! */		*local = 1;		}	else		{		/* resort to rsa->mt_blinding instead */		*local = 0; /* instructs rsa_blinding_convert(), rsa_blinding_invert()		             * that the BN_BLINDING is shared, meaning that accesses		             * require locks, and that the blinding factor must be		             * stored outside the BN_BLINDING		             */		if (rsa->mt_blinding == NULL)			{			if (!got_write_lock)				{				CRYPTO_r_unlock(CRYPTO_LOCK_RSA);				CRYPTO_w_lock(CRYPTO_LOCK_RSA);				got_write_lock = 1;				}						if (rsa->mt_blinding == NULL)				rsa->mt_blinding = RSA_setup_blinding(rsa, ctx);			}		ret = rsa->mt_blinding;		} err:	if (got_write_lock)		CRYPTO_w_unlock(CRYPTO_LOCK_RSA);	else		CRYPTO_r_unlock(CRYPTO_LOCK_RSA);	return ret;}
开发者ID:repos-holder,项目名称:openbsd-patches,代码行数:59,


示例6: ssleay_rand_status

static int ssleay_rand_status(void)	{	int ret;	int do_not_lock;	/* check if we already have the lock	 * (could happen if a RAND_poll() implementation calls RAND_status()) */	if (crypto_lock_rand)		{		CRYPTO_r_lock(CRYPTO_LOCK_RAND2);		do_not_lock = (locking_thread == CRYPTO_thread_id());		CRYPTO_r_unlock(CRYPTO_LOCK_RAND2);		}	else		do_not_lock = 0;		if (!do_not_lock)		{		CRYPTO_w_lock(CRYPTO_LOCK_RAND);				/* prevent ssleay_rand_bytes() from trying to obtain the lock again */		CRYPTO_w_lock(CRYPTO_LOCK_RAND2);		locking_thread = CRYPTO_thread_id();		CRYPTO_w_unlock(CRYPTO_LOCK_RAND2);		crypto_lock_rand = 1;		}		if (!initialized)		{		RAND_poll();		initialized = 1;		}	ret = entropy >= ENTROPY_NEEDED;	if (!do_not_lock)		{		/* before unlocking, we must clear 'crypto_lock_rand' */		crypto_lock_rand = 0;				CRYPTO_w_unlock(CRYPTO_LOCK_RAND);		}		return ret;	}
开发者ID:RafaelRMachado,项目名称:MinnowBoard,代码行数:45,


示例7:

ERR_STATE *ERR_get_state(void)	{	ERR_STATE *ret=NULL,tmp,*tmpp;	int i;	unsigned long pid;	pid=(unsigned long)CRYPTO_thread_id();	CRYPTO_r_lock(CRYPTO_LOCK_ERR);	if (thread_hash == NULL)		{		CRYPTO_r_unlock(CRYPTO_LOCK_ERR);		CRYPTO_w_lock(CRYPTO_LOCK_ERR);		if (thread_hash == NULL)			{			MemCheck_off();			thread_hash=lh_new(pid_hash,pid_cmp);			MemCheck_on();			CRYPTO_w_unlock(CRYPTO_LOCK_ERR);			if (thread_hash == NULL) return(getFallback());			}		else			CRYPTO_w_unlock(CRYPTO_LOCK_ERR);		}	else		{		tmp.pid=pid;		ret=(ERR_STATE *)lh_retrieve(thread_hash,&tmp);		CRYPTO_r_unlock(CRYPTO_LOCK_ERR);		}	/* ret == the error state, if NULL, make a new one */	if (ret == NULL)		{		ret=(ERR_STATE *)Malloc(sizeof(ERR_STATE));		if (ret == NULL) return(getFallback());		ret->pid=pid;		ret->top=0;		ret->bottom=0;		for (i=0; i<ERR_NUM_ERRORS; i++)			{			ret->err_data[i]=NULL;			ret->err_data_flags[i]=0;			}		CRYPTO_w_lock(CRYPTO_LOCK_ERR);		tmpp=(ERR_STATE *)lh_insert(thread_hash,ret);		CRYPTO_w_unlock(CRYPTO_LOCK_ERR);		if (tmpp != NULL) /* old entry - should not happen */			{			ERR_STATE_free(tmpp);			}		}	return(ret);	}
开发者ID:Apple-FOSS-Mirror,项目名称:Security,代码行数:54,


示例8: ERR_remove_state

void ERR_remove_state(unsigned long pid)	{	ERR_STATE tmp;	err_fns_check();	if (pid == 0)		pid=(unsigned long)CRYPTO_thread_id();	tmp.pid=pid;	/* thread_del_item automatically destroys the LHASH if the number of	 * items reaches zero. */	ERRFN(thread_del_item)(&tmp);	}
开发者ID:174high,项目名称:openssl-0.9.8e_linux_porting,代码行数:12,


示例9: fips_is_owning_thread

int fips_is_owning_thread(void)	{	int ret = 0;	if (fips_is_started())		{		CRYPTO_r_lock(CRYPTO_LOCK_FIPS2);		if (fips_thread != 0 && fips_thread == CRYPTO_thread_id())			ret = 1;		CRYPTO_r_unlock(CRYPTO_LOCK_FIPS2);		}	return ret;	}
开发者ID:aosm,项目名称:OpenSSL097,代码行数:13,


示例10: ssl_pthreads_locking_callback

static voidssl_pthreads_locking_callback (int mode, int type, char *file, int line){  dmsg (D_OPENSSL_LOCK, "SSL LOCK thread=%4lu mode=%s lock=%s %s:%d",	   CRYPTO_thread_id (),	   (mode & CRYPTO_LOCK) ? "l" : "u",	   (type & CRYPTO_READ) ? "r" : "w", file, line);  if (mode & CRYPTO_LOCK)    pthread_mutex_lock (&ssl_mutex[type].mutex);  else    pthread_mutex_unlock (&ssl_mutex[type].mutex);}
开发者ID:VolkerStolz,项目名称:bench,代码行数:13,


示例11: CRYPTO_add_lock

int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,	     int line)	{	int ret = 0;	if (add_lock_callback != NULL)		{#ifdef LOCK_DEBUG		int before= *pointer;#endif		ret=add_lock_callback(pointer,amount,type,file,line);#ifdef LOCK_DEBUG		fprintf(stderr,"ladd:%08lx:%2d+%2d->%2d %-18s %s:%d/n",			CRYPTO_thread_id(),			before,amount,ret,			CRYPTO_get_lock_name(type),			file,line);#endif		}	else		{		CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,file,line);		ret= *pointer+amount;#ifdef LOCK_DEBUG		fprintf(stderr,"ladd:%08lx:%2d+%2d->%2d %-18s %s:%d/n",			CRYPTO_thread_id(),			*pointer,amount,ret,			CRYPTO_get_lock_name(type),			file,line);#endif		*pointer=ret;		CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,file,line);		}	return(ret);	}
开发者ID:SRI-CSL,项目名称:ENCODERS,代码行数:37,


示例12: ERR_remove_state

void ERR_remove_state(unsigned long pid)	{	ERR_STATE *p,tmp;	if (thread_hash == NULL)		return;	if (pid == 0)		pid=(unsigned long)CRYPTO_thread_id();	tmp.pid=pid;	CRYPTO_w_lock(CRYPTO_LOCK_ERR);	p=(ERR_STATE *)lh_delete(thread_hash,&tmp);	CRYPTO_w_unlock(CRYPTO_LOCK_ERR);	if (p != NULL) ERR_STATE_free(p);	}
开发者ID:Apple-FOSS-Mirror,项目名称:Security,代码行数:15,


示例13: solaris_locking_callback

static void solaris_locking_callback(int mode, int type, const char *file, int line){#if 0  fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d/n",          CRYPTO_thread_id(),          (mode & CRYPTO_LOCK) ? "l" : "u",          (type & CRYPTO_READ) ? "r" : "w", file, line);#endif#if 0  if (CRYPTO_LOCK_SSL_CERT == type)    fprintf(stderr, "(t,m,f,l) %ld %d %s %d/n",            CRYPTO_thread_id(),            mode, file, line);#endif  if (mode & CRYPTO_LOCK)  {#ifdef USE_MUTEX    mutex_lock(&(lock_cs[type]));#else    if (mode & CRYPTO_READ)      rw_rdlock(&(lock_cs[type]));    else      rw_wrlock(&(lock_cs[type]));#endif    lock_count[type]++;  }  else  {#ifdef USE_MUTEX    mutex_unlock(&(lock_cs[type]));#else    rw_unlock(&(lock_cs[type]));#endif  }}
开发者ID:Shaddy1884,项目名称:lua-openssl,代码行数:36,


示例14: beos_locking_callback

void beos_locking_callback(int mode, int type, const char *file, int line){# if 0    fprintf(stderr, "thread=%4d mode=%s lock=%s %s:%d/n",            CRYPTO_thread_id(),            (mode & CRYPTO_LOCK) ? "l" : "u",            (type & CRYPTO_READ) ? "r" : "w", file, line);# endif    if (mode & CRYPTO_LOCK) {        lock_cs[type]->Lock();        lock_count[type]++;    } else {        lock_cs[type]->Unlock();    }}
开发者ID:johnjohnsp1,项目名称:opensgx,代码行数:15,


示例15: ERR_print_errors_fp

void ERR_print_errors_fp(FILE *fp)	{	unsigned long l;	char buf[200];	const char *file,*data;	int line,flags;	unsigned long es;	es=CRYPTO_thread_id();	while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)		{		fprintf(fp,"%lu:%s:%s:%d:%s/n",es,ERR_error_string(l,buf),			file,line,(flags&ERR_TXT_STRING)?data:"");		}	}
开发者ID:Apple-FOSS-Mirror,项目名称:Security,代码行数:15,


示例16: fips_clear_owning_thread

int fips_clear_owning_thread(void)	{	int ret = 0;	if (fips_is_started())		{		CRYPTO_w_lock(CRYPTO_LOCK_FIPS2);		if (fips_thread == CRYPTO_thread_id())			{			fips_thread = 0;			ret = 1;			}		CRYPTO_w_unlock(CRYPTO_LOCK_FIPS2);		}	return ret;	}
开发者ID:aosm,项目名称:OpenSSL097,代码行数:16,


示例17: myLockingCallback

static void myLockingCallback(int mode, int type, const char *file,                  int line) {#ifdef undef    fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d/n",        CRYPTO_thread_id(),        (mode&CRYPTO_LOCK)?"l":"u",        (type&CRYPTO_READ)?"r":"w",file,line);#endif    if (mode & CRYPTO_LOCK) {    pthread_mutex_lock(&(lock_cs[type]));    lock_count[type]++;    }    else {    pthread_mutex_unlock(&(lock_cs[type]));    }}
开发者ID:AGProjects,项目名称:python-sipsimple,代码行数:16,


示例18: SSL_pthreads_locking_callback

void SSL_pthreads_locking_callback(int mode, int type, char *file, int line) {  if( my.debug == 4 ){    fprintf(      stderr,"thread=%4d mode=%s lock=%s %s:%d/n", (int)CRYPTO_thread_id(),      (mode&CRYPTO_LOCK)?"l":"u", (type&CRYPTO_READ)?"r":"w",file,line    );  }  if(mode & CRYPTO_LOCK){    pthread_mutex_lock(&(lock_cs[type]));    lock_count[type]++;  }   else{     pthread_mutex_unlock(&(lock_cs[type]));  }}
开发者ID:lizconlan,项目名称:siege-2.67-fork,代码行数:17,


示例19: CRYPTO_lock

void CRYPTO_lock(int mode, int type, const char *file, int line)	{#ifdef LOCK_DEBUG		{		char *rw_text,*operation_text;		if (mode & CRYPTO_LOCK)			operation_text="lock  ";		else if (mode & CRYPTO_UNLOCK)			operation_text="unlock";		else			operation_text="ERROR ";		if (mode & CRYPTO_READ)			rw_text="r";		else if (mode & CRYPTO_WRITE)			rw_text="w";		else			rw_text="ERROR";		fprintf(stderr,"lock:%08lx:(%s)%s %-18s %s:%d/n",			CRYPTO_thread_id(), rw_text, operation_text,			CRYPTO_get_lock_name(type), file, line);		}#endif	if (type < 0)		{		if (dynlock_lock_callback != NULL)			{			struct CRYPTO_dynlock_value *pointer				= CRYPTO_get_dynlock_value(type);			OPENSSL_assert(pointer != NULL);			dynlock_lock_callback(mode, pointer, file, line);			CRYPTO_destroy_dynlockid(type);			}		}	else		if (locking_callback != NULL)			locking_callback(mode,type,file,line);	}
开发者ID:aosm,项目名称:OpenSSL097,代码行数:43,


示例20: ERR_print_errors_cb

void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),			 void *u)	{	unsigned long l;	char buf[256];	char buf2[4096];	const char *file,*data;	int line,flags;	unsigned long es;	es=CRYPTO_thread_id();	while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)		{		ERR_error_string_n(l, buf, sizeof buf);		BIO_snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s/n", es, buf,			file, line, (flags & ERR_TXT_STRING) ? data : "");		cb(buf2, strlen(buf2), u);		}	}
开发者ID:LucidOne,项目名称:Rovio,代码行数:19,


示例21: ERR_print_errors

void ERR_print_errors(BIO *bp)	{	unsigned long l;	char buf[256];	char buf2[256];	const char *file,*data;	int line,flags;	unsigned long es;	es=CRYPTO_thread_id();	while ((l=ERR_get_error_line_data(&file,&line,&data,&flags)) != 0)		{		sprintf(buf2,"%lu:%s:%s:%d:",es,ERR_error_string(l,buf),			file,line);		BIO_write(bp,buf2,strlen(buf2));		if (flags & ERR_TXT_STRING)			BIO_write(bp,data,strlen(data));		BIO_write(bp,"/n",1);		}	}
开发者ID:Apple-FOSS-Mirror,项目名称:Security,代码行数:20,


示例22: err_fns_check

ERR_STATE *ERR_get_state(void)	{	static ERR_STATE fallback;	ERR_STATE *ret,tmp,*tmpp=NULL;	int i;	unsigned long pid;	err_fns_check();	pid=(unsigned long)CRYPTO_thread_id();	tmp.pid=pid;	ret=ERRFN(thread_get_item)(&tmp);	/* ret == the error state, if NULL, make a new one */	if (ret == NULL)		{		ret=(ERR_STATE *)OPENSSL_malloc(sizeof(ERR_STATE));		if (ret == NULL) return(&fallback);		ret->pid=pid;		ret->top=0;		ret->bottom=0;		for (i=0; i<ERR_NUM_ERRORS; i++)			{			ret->err_data[i]=NULL;			ret->err_data_flags[i]=0;			}		tmpp = ERRFN(thread_set_item)(ret);		/* To check if insertion failed, do a get. */		if (ERRFN(thread_get_item)(ret) != ret)			{			ERR_STATE_free(ret); /* could not insert it */			return(&fallback);			}		/* If a race occured in this function and we came second, tmpp		 * is the first one that we just replaced. */		if (tmpp)			ERR_STATE_free(tmpp);		}	return ret;	}
开发者ID:174high,项目名称:openssl-0.9.8e_linux_porting,代码行数:39,


示例23: CRYPTO_w_lock

static BN_BLINDING *rsa_get_blinding(RSA *rsa, BIGNUM **r, int *local, BN_CTX *ctx){	BN_BLINDING *ret;	if (rsa->blinding == NULL)		{		if (rsa->blinding == NULL)			{			CRYPTO_w_lock(CRYPTO_LOCK_RSA);			if (rsa->blinding == NULL)				rsa->blinding = RSA_setup_blinding(rsa, ctx);			CRYPTO_w_unlock(CRYPTO_LOCK_RSA);			}		}	ret = rsa->blinding;	if (ret == NULL)		return NULL;	if (BN_BLINDING_get_thread_id(ret) != CRYPTO_thread_id())		{		*local = 0;		if (rsa->mt_blinding == NULL)			{			CRYPTO_w_lock(CRYPTO_LOCK_RSA);			if (rsa->mt_blinding == NULL)				rsa->mt_blinding = RSA_setup_blinding(rsa, ctx);			CRYPTO_w_unlock(CRYPTO_LOCK_RSA);			}		ret = rsa->mt_blinding;		}	else		*local = 1;	return ret;}
开发者ID:mxOBS,项目名称:debian_openssl,代码行数:36,


示例24: ERR_remove_state

void ERR_remove_state(unsigned long pid)	{	ERR_STATE *p = NULL,tmp;	if (thread_hash == NULL)		return;	if (pid == 0)		pid=(unsigned long)CRYPTO_thread_id();	tmp.pid=pid;	CRYPTO_w_lock(CRYPTO_LOCK_ERR);	if (thread_hash)		{		p=(ERR_STATE *)lh_delete(thread_hash,&tmp);		if (lh_num_items(thread_hash) == 0)			{			/* make sure we don't leak memory */			lh_free(thread_hash);			thread_hash = NULL;			}		}	CRYPTO_w_unlock(CRYPTO_LOCK_ERR);	if (p != NULL) ERR_STATE_free(p);	}
开发者ID:ahenroid,项目名称:ptptl-0.2,代码行数:24,


示例25: BN_CTX_start

BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *in_ctx){	BIGNUM local_n;	BIGNUM *e,*n;	BN_CTX *ctx;	BN_BLINDING *ret = NULL;	if (in_ctx == NULL)		{		if ((ctx = BN_CTX_new()) == NULL) return 0;		}	else		ctx = in_ctx;	BN_CTX_start(ctx);	e  = BN_CTX_get(ctx);	if (e == NULL)		{		RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_MALLOC_FAILURE);		goto err;		}	if (rsa->e == NULL)		{		e = rsa_get_public_exp(rsa->d, rsa->p, rsa->q, ctx);		if (e == NULL)			{			RSAerr(RSA_F_RSA_SETUP_BLINDING, RSA_R_NO_PUBLIC_EXPONENT);			goto err;			}		}	else		e = rsa->e;		if ((RAND_status() == 0) && rsa->d != NULL && rsa->d->d != NULL)		{		/* if PRNG is not properly seeded, resort to secret		 * exponent as unpredictable seed */		RAND_add(rsa->d->d, rsa->d->dmax * sizeof rsa->d->d[0], 0.0);		}	if (!(rsa->flags & RSA_FLAG_NO_CONSTTIME))		{		/* Set BN_FLG_CONSTTIME flag */		n = &local_n;		BN_with_flags(n, rsa->n, BN_FLG_CONSTTIME);		}	else		n = rsa->n;	ret = BN_BLINDING_create_param(NULL, e, n, ctx,			rsa->meth->bn_mod_exp, rsa->_method_mod_n);	if (ret == NULL)		{		RSAerr(RSA_F_RSA_SETUP_BLINDING, ERR_R_BN_LIB);		goto err;		}	BN_BLINDING_set_thread_id(ret, CRYPTO_thread_id());err:	BN_CTX_end(ctx);	if (in_ctx == NULL)		BN_CTX_free(ctx);	if(rsa->e == NULL)		BN_free(e);	return ret;}
开发者ID:RafaelRMachado,项目名称:MinnowBoard,代码行数:68,



注:本文中的CRYPTO_thread_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ CRYPTO_w_lock函数代码示例
C++ CRYPTO_set_locking_callback函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。