本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: NETSCAPE_SPKAC_free
void
NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a)
{
ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_SPKAC_it);
}
示例5: ESS_SIGNING_CERT_free
void
ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a)
{
ASN1_item_free((ASN1_VALUE *)a, &ESS_SIGNING_CERT_it);
}
示例6: X509_ATTRIBUTE_free
void
X509_ATTRIBUTE_free(X509_ATTRIBUTE *a)
{
ASN1_item_free((ASN1_VALUE *)a, &X509_ATTRIBUTE_it);
}
示例7: X509_free
void
X509_free(X509 *a)
{
ASN1_item_free((ASN1_VALUE *)a, &X509_it);
}
示例8: PKCS12_SAFEBAG_free
void
PKCS12_SAFEBAG_free(PKCS12_SAFEBAG *a)
{
ASN1_item_free((ASN1_VALUE *)a, &PKCS12_SAFEBAG_it);
}
示例9: PKCS12_MAC_DATA_free
void
PKCS12_MAC_DATA_free(PKCS12_MAC_DATA *a)
{
ASN1_item_free((ASN1_VALUE *)a, &PKCS12_MAC_DATA_it);
}
示例10: PROXY_POLICY_free
void
PROXY_POLICY_free(PROXY_POLICY *a)
{
ASN1_item_free((ASN1_VALUE *)a, &PROXY_POLICY_it);
}
示例11: EDIPARTYNAME_free
void
EDIPARTYNAME_free(EDIPARTYNAME *a)
{
ASN1_item_free((ASN1_VALUE *)a, &EDIPARTYNAME_it);
}
示例12: OTHERNAME_free
void
OTHERNAME_free(OTHERNAME *a)
{
ASN1_item_free((ASN1_VALUE *)a, &OTHERNAME_it);
}
示例13: ASN1_INTEGER_free
void ASN1_INTEGER_free(ASN1_INTEGER *a)
{
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(ASN1_INTEGER));
}
示例14: X509_EXTENSION_free
void
X509_EXTENSION_free(X509_EXTENSION *a)
{
ASN1_item_free((ASN1_VALUE *)a, &X509_EXTENSION_it);
}
示例15: X509_PUBKEY_free
void
X509_PUBKEY_free(X509_PUBKEY *a)
{
ASN1_item_free((ASN1_VALUE *)a, &X509_PUBKEY_it);
}