当前位置: 首页>>代码示例>>C++>>正文


C++ ASN1_item_free函数代码示例

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


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

示例1: do_ext_nconf

/* char *value:  Value    */
static X509_EXTENSION *
do_ext_nconf(CONF *conf, X509V3_CTX *ctx, int ext_nid, int crit, char *value)
{
	const X509V3_EXT_METHOD *method;
	X509_EXTENSION *ext;
	STACK_OF(CONF_VALUE) *nval;
	void *ext_struc;

	if (ext_nid == NID_undef) {
		X509V3err(X509V3_F_DO_EXT_NCONF,
		    X509V3_R_UNKNOWN_EXTENSION_NAME);
		return NULL;
	}
	if (!(method = X509V3_EXT_get_nid(ext_nid))) {
		X509V3err(X509V3_F_DO_EXT_NCONF, X509V3_R_UNKNOWN_EXTENSION);
		return NULL;
	}
	/* Now get internal extension representation based on type */
	if (method->v2i) {
		if (*value == '@')
			nval = NCONF_get_section(conf, value + 1);
		else
			nval = X509V3_parse_list(value);
		if (sk_CONF_VALUE_num(nval) <= 0) {
			X509V3err(X509V3_F_DO_EXT_NCONF,
			    X509V3_R_INVALID_EXTENSION_STRING);
			ERR_asprintf_error_data("name=%s,section=%s",
			    OBJ_nid2sn(ext_nid), value);
			return NULL;
		}
		ext_struc = method->v2i(method, ctx, nval);
		if (*value != '@')
			sk_CONF_VALUE_pop_free(nval, X509V3_conf_free);
		if (!ext_struc)
			return NULL;
	} else if (method->s2i) {
		if (!(ext_struc = method->s2i(method, ctx, value)))
			return NULL;
	} else if (method->r2i) {
		if (!ctx->db || !ctx->db_meth) {
			X509V3err(X509V3_F_DO_EXT_NCONF,
			    X509V3_R_NO_CONFIG_DATABASE);
			return NULL;
		}
		if (!(ext_struc = method->r2i(method, ctx, value)))
			return NULL;
	} else {
		X509V3err(X509V3_F_DO_EXT_NCONF,
		    X509V3_R_EXTENSION_SETTING_NOT_SUPPORTED);
		ERR_asprintf_error_data("name=%s", OBJ_nid2sn(ext_nid));
		return NULL;
	}

	ext = do_ext_i2d(method, ext_nid, crit, ext_struc);
	if (method->it)
		ASN1_item_free(ext_struc, ASN1_ITEM_ptr(method->it));
	else
		method->ext_free(ext_struc);
	return ext;
}
开发者ID:SylvestreG,项目名称:bitrig,代码行数:61,代码来源:v3_conf.c

示例2: FuzzerTestOneInput

int FuzzerTestOneInput(const uint8_t *buf, size_t len) {
    for (int n = 0; item_type[n] != NULL; ++n) {
        const uint8_t *b = buf;
        ASN1_VALUE *o = ASN1_item_d2i(NULL, &b, len, item_type[n]);
        ASN1_item_free(o, item_type[n]);
    }
    return 0;
}
开发者ID:1234-,项目名称:openssl,代码行数:8,代码来源:asn1.c

示例3: X509V3_EXT_free

int X509V3_EXT_free(int nid, void *ext_data)
{
    const X509V3_EXT_METHOD *ext_method = X509V3_EXT_get_nid(nid);
    if (ext_method == NULL) {
        OPENSSL_PUT_ERROR(X509V3, X509V3_R_CANNOT_FIND_FREE_FUNCTION);
        return 0;
    }

    if (ext_method->it != NULL)
        ASN1_item_free(ext_data, ASN1_ITEM_ptr(ext_method->it));
    else if (ext_method->ext_free != NULL)
        ext_method->ext_free(ext_data);
    else {
        OPENSSL_PUT_ERROR(X509V3, X509V3_R_CANNOT_FIND_FREE_FUNCTION);
        return 0;
    }

    return 1;
}
开发者ID:0x64616E69656C,项目名称:boringssl,代码行数:19,代码来源:v3_lib.c

示例4: NETSCAPE_SPKAC_free

void
NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_SPKAC_it);
}
开发者ID:2trill2spill,项目名称:nextgen,代码行数:5,代码来源:x_spki.c

示例5: ESS_SIGNING_CERT_free

void
ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &ESS_SIGNING_CERT_it);
}
开发者ID:Heratom,项目名称:Firefly-project,代码行数:5,代码来源:ts_asn1.c

示例6: X509_ATTRIBUTE_free

void
X509_ATTRIBUTE_free(X509_ATTRIBUTE *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &X509_ATTRIBUTE_it);
}
开发者ID:MiKTeX,项目名称:miktex,代码行数:5,代码来源:x_attrib.c

示例7: X509_free

void
X509_free(X509 *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &X509_it);
}
开发者ID:robertbachmann,项目名称:openbsd-libssl,代码行数:5,代码来源:x_x509.c

示例8: PKCS12_SAFEBAG_free

void
PKCS12_SAFEBAG_free(PKCS12_SAFEBAG *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &PKCS12_SAFEBAG_it);
}
开发者ID:mr-moai-2016,项目名称:znk_project,代码行数:5,代码来源:p12_asn.c

示例9: PKCS12_MAC_DATA_free

void
PKCS12_MAC_DATA_free(PKCS12_MAC_DATA *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &PKCS12_MAC_DATA_it);
}
开发者ID:mr-moai-2016,项目名称:znk_project,代码行数:5,代码来源:p12_asn.c

示例10: PROXY_POLICY_free

void
PROXY_POLICY_free(PROXY_POLICY *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &PROXY_POLICY_it);
}
开发者ID:MiKTeX,项目名称:miktex,代码行数:5,代码来源:v3_pcia.c

示例11: EDIPARTYNAME_free

void
EDIPARTYNAME_free(EDIPARTYNAME *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &EDIPARTYNAME_it);
}
开发者ID:2trill2spill,项目名称:nextgen,代码行数:5,代码来源:v3_genn.c

示例12: OTHERNAME_free

void
OTHERNAME_free(OTHERNAME *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &OTHERNAME_it);
}
开发者ID:2trill2spill,项目名称:nextgen,代码行数:5,代码来源:v3_genn.c

示例13: ASN1_INTEGER_free

void ASN1_INTEGER_free(ASN1_INTEGER *a)
{
    ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(ASN1_INTEGER));
}
开发者ID:kobemiller,项目名称:mycode,代码行数:4,代码来源:asn1_note.c

示例14: X509_EXTENSION_free

void
X509_EXTENSION_free(X509_EXTENSION *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &X509_EXTENSION_it);
}
开发者ID:Heratom,项目名称:Firefly-project,代码行数:5,代码来源:x_exten.c

示例15: X509_PUBKEY_free

void
X509_PUBKEY_free(X509_PUBKEY *a)
{
	ASN1_item_free((ASN1_VALUE *)a, &X509_PUBKEY_it);
}
开发者ID:mr-moai-2016,项目名称:znk_project,代码行数:5,代码来源:x_pubkey.c


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