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

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

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

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

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

示例1: X509_PUBKEY_get0

EVP_PKEY *X509_PUBKEY_get0(X509_PUBKEY *key){	EVP_PKEY *ret = NULL;	if (key == NULL)		goto error;	if (key->pkey != NULL)		return key->pkey;	if (key->public_key == NULL)		goto error;	if ((ret = EVP_PKEY_new()) == NULL) {		X509error(ERR_R_MALLOC_FAILURE);		goto error;	}	if (!EVP_PKEY_set_type(ret, OBJ_obj2nid(key->algor->algorithm))) {		X509error(X509_R_UNSUPPORTED_ALGORITHM);		goto error;	}	if (ret->ameth->pub_decode) {		if (!ret->ameth->pub_decode(ret, key)) {			X509error(X509_R_PUBLIC_KEY_DECODE_ERROR);			goto error;		}	} else {		X509error(X509_R_METHOD_NOT_SUPPORTED);		goto error;	}	/* Check to see if another thread set key->pkey first */	CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY);	if (key->pkey) {		CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);		EVP_PKEY_free(ret);		ret = key->pkey;	} else {		key->pkey = ret;		CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY);	}	return ret;error:	EVP_PKEY_free(ret);	return (NULL);}
开发者ID:mr-moai-2016,项目名称:znk_project,代码行数:51,


示例2: open_console

/* Internal functions to open, handle and close a channel to the console.  */static int open_console(UI *ui){    CRYPTO_w_lock(CRYPTO_LOCK_UI);    is_a_tty = 1;#if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_VXWORKS) || defined(OPENSSL_SYS_NETWARE) || defined(OPENSSL_SYS_BEOS)    tty_in = stdin;    tty_out = stderr;#else# ifdef OPENSSL_SYS_MSDOS#  define DEV_TTY "con"# else#  define DEV_TTY "/dev/tty"# endif    if ((tty_in = fopen(DEV_TTY, "r")) == NULL)        tty_in = stdin;    if ((tty_out = fopen(DEV_TTY, "w")) == NULL)        tty_out = stderr;#endif#if defined(TTY_get) && !defined(OPENSSL_SYS_VMS)    if (TTY_get(fileno(tty_in), &tty_orig) == -1) {# ifdef ENOTTY        if (errno == ENOTTY)            is_a_tty = 0;        else# endif# ifdef EINVAL            /*             * Ariel Glenn [email
C++ CRYPT_MOD_CALL_CHECK函数代码示例
C++ CRYPTO_thread_id函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。