當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。