本文整理汇总了C++中REF_PRINT函数的典型用法代码示例。如果您正苦于以下问题:C++ REF_PRINT函数的具体用法?C++ REF_PRINT怎么用?C++ REF_PRINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了REF_PRINT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: EVP_PKEY_free
void EVP_PKEY_free(EVP_PKEY *x)
{
int i;
if (x == NULL) return;
i=CRYPTO_add(&x->references,-1,CRYPTO_LOCK_EVP_PKEY);
#ifdef REF_PRINT
REF_PRINT("EVP_PKEY",x);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"EVP_PKEY_free, bad reference count\n");
abort();
}
#endif
EVP_PKEY_free_it(x);
#ifndef OPENSSL_NO_X509
if (x->attributes)
sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free);
#endif
OPENSSL_free(x);
}
开发者ID:ClarenceAustin,项目名称:conceal,代码行数:25,代码来源:p_lib.c
示例2: EC_KEY_free
void EC_KEY_free(EC_KEY *r)
{
int i;
if (r == NULL) return;
i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_EC);
#ifdef REF_PRINT
REF_PRINT("EC_KEY",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"EC_KEY_free, bad reference count\n");
abort();
}
#endif
if (r->group != NULL)
EC_GROUP_free(r->group);
if (r->pub_key != NULL)
EC_POINT_free(r->pub_key);
if (r->priv_key != NULL)
BN_clear_free(r->priv_key);
EC_EX_DATA_free_all_data(&r->method_data);
OPENSSL_cleanse((void *)r, sizeof(EC_KEY));
OPENSSL_free(r);
}
开发者ID:LucidOne,项目名称:Rovio,代码行数:32,代码来源:ec_key.c
示例3: DSA_free
void DSA_free(DSA *r)
{
int i;
if (r == NULL) return;
i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_DSA);
#ifdef REF_PRINT
REF_PRINT("DSA",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"DSA_free, bad reference count\n");
abort();
}
#endif
CRYPTO_free_ex_data(dsa_meth, r, &r->ex_data);
if(r->meth->finish) r->meth->finish(r);
if (r->p != NULL) BN_clear_free(r->p);
if (r->q != NULL) BN_clear_free(r->q);
if (r->g != NULL) BN_clear_free(r->g);
if (r->pub_key != NULL) BN_clear_free(r->pub_key);
if (r->priv_key != NULL) BN_clear_free(r->priv_key);
if (r->kinv != NULL) BN_clear_free(r->kinv);
if (r->r != NULL) BN_clear_free(r->r);
OPENSSL_free(r);
}
开发者ID:ahenroid,项目名称:ptptl-0.2,代码行数:32,代码来源:dsa_lib.c
示例4: EC_KEY_free
void EC_KEY_free(EC_KEY *r)
{
int i;
if (r == NULL)
return;
i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_EC);
#ifdef REF_PRINT
REF_PRINT("EC_KEY", r);
#endif
if (i > 0)
return;
#ifdef REF_CHECK
if (i < 0) {
fprintf(stderr, "EC_KEY_free, bad reference count\n");
abort();
}
#endif
if (r->meth->finish != NULL)
r->meth->finish(r);
#ifndef OPENSSL_NO_ENGINE
if (r->engine != NULL)
ENGINE_finish(r->engine);
#endif
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_EC_KEY, r, &r->ex_data);
EC_GROUP_free(r->group);
EC_POINT_free(r->pub_key);
BN_clear_free(r->priv_key);
OPENSSL_clear_free((void *)r, sizeof(EC_KEY));
}
开发者ID:Voxer,项目名称:openssl,代码行数:35,代码来源:ec_key.c
示例5: BIO_free
int BIO_free(BIO *a)
{
int ret=0,i;
if (a == NULL) return(0);
i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_BIO);
#ifdef REF_PRINT
REF_PRINT("BIO",a);
#endif
if (i > 0) return(1);
#ifdef REF_CHECK
if (i < 0)
{
TINYCLR_SSL_FPRINTF(OPENSSL_TYPE__FILE_STDERR,"BIO_free, bad reference count\n");
TINYCLR_SSL_ABORT();
}
#endif
if ((a->callback != NULL) &&
((i=(int)a->callback(a,BIO_CB_FREE,NULL,0,0L,1L)) <= 0))
return(i);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);
ret=a->method->destroy(a);
OPENSSL_free(a);
return(1);
}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:29,代码来源:bio_lib.cpp
示例6: check_store
X509 *STORE_get_certificate(STORE *s, OPENSSL_ITEM attributes[],
OPENSSL_ITEM parameters[])
{
STORE_OBJECT *object;
X509 *x;
check_store(s,STORE_F_STORE_GET_CERTIFICATE,
get_object,STORE_R_NO_GET_OBJECT_FUNCTION);
object = s->meth->get_object(s, STORE_OBJECT_TYPE_X509_CERTIFICATE,
attributes, parameters);
if (!object || !object->data.x509.certificate)
{
STOREerr(STORE_F_STORE_GET_CERTIFICATE,
STORE_R_FAILED_GETTING_CERTIFICATE);
return 0;
}
CRYPTO_add(&object->data.x509.certificate->references,1,CRYPTO_LOCK_X509);
#ifdef REF_PRINT
REF_PRINT("X509",data);
#endif
x = object->data.x509.certificate;
STORE_OBJECT_free(object);
return x;
}
开发者ID:Digt,项目名称:TrustedSSL,代码行数:25,代码来源:str_lib.c
示例7: DH_free
void DH_free(DH *r)
{
int i;
if(r == NULL) return;
i = CRYPTO_add(&r->references, -1, CRYPTO_LOCK_DH);
#ifdef REF_PRINT
REF_PRINT("DH",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"DH_free, bad reference count\n");
abort();
}
#endif
if(r->meth->finish) r->meth->finish(r);
CRYPTO_free_ex_data(dh_meth, r, &r->ex_data);
if (r->p != NULL) BN_clear_free(r->p);
if (r->g != NULL) BN_clear_free(r->g);
if (r->q != NULL) BN_clear_free(r->q);
if (r->j != NULL) BN_clear_free(r->j);
if (r->seed) Free(r->seed);
if (r->counter != NULL) BN_clear_free(r->counter);
if (r->pub_key != NULL) BN_clear_free(r->pub_key);
if (r->priv_key != NULL) BN_clear_free(r->priv_key);
Free(r);
}
开发者ID:unofficial-opensource-apple,项目名称:Security,代码行数:31,代码来源:dh_lib.c
示例8: X509_INFO_free
void X509_INFO_free(X509_INFO *x)
{
int i;
if (x == NULL) return;
i=CRYPTO_add(&x->references,-1,CRYPTO_LOCK_X509_INFO);
#ifdef REF_PRINT
REF_PRINT("X509_INFO",x);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"X509_INFO_free, bad reference count\n");
abort();
}
#endif
if (x->x509 != NULL) X509_free(x->x509);
if (x->crl != NULL) X509_CRL_free(x->crl);
if (x->x_pkey != NULL) X509_PKEY_free(x->x_pkey);
if (x->enc_data != NULL) OPENSSL_free(x->enc_data);
OPENSSL_free(x);
}
开发者ID:RafaelRMachado,项目名称:MinnowBoard,代码行数:25,代码来源:x_info.c
示例9: BIO_free
int BIO_free(BIO *a)
{
int i;
if (a == NULL) return(0);
i=CRYPTO_add(&a->references,-1,CRYPTO_LOCK_BIO);
#ifdef REF_PRINT
REF_PRINT("BIO",a);
#endif
if (i > 0) return(1);
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"BIO_free, bad reference count\n");
abort();
}
#endif
if ((a->callback != NULL) &&
((i=(int)a->callback(a,BIO_CB_FREE,NULL,0,0L,1L)) <= 0))
return(i);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_BIO, a, &a->ex_data);
if ((a->method == NULL) || (a->method->destroy == NULL)) return(1);
a->method->destroy(a);
OPENSSL_free(a);
return(1);
}
开发者ID:002301,项目名称:node,代码行数:29,代码来源:bio_lib.c
示例10: X509_STORE_free
void X509_STORE_free(X509_STORE *vfy)
{
int i;
STACK_OF(X509_LOOKUP) *sk;
X509_LOOKUP *lu;
if (vfy == NULL)
return;
i = CRYPTO_add(&vfy->references, -1, CRYPTO_LOCK_X509_STORE);
#ifdef REF_PRINT
REF_PRINT("X509_STORE", vfy);
#endif
if (i > 0)
return;
#ifdef REF_CHECK
if (i < 0) {
fprintf(stderr, "X509_STORE_free, bad reference count\n");
abort(); /* ok */
}
#endif
sk = vfy->get_cert_methods;
for (i = 0; i < sk_X509_LOOKUP_num(sk); i++) {
lu = sk_X509_LOOKUP_value(sk, i);
X509_LOOKUP_shutdown(lu);
X509_LOOKUP_free(lu);
}
sk_X509_LOOKUP_free(sk);
sk_X509_OBJECT_pop_free(vfy->objs, cleanup);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);
X509_VERIFY_PARAM_free(vfy->param);
OPENSSL_free(vfy);
}
开发者ID:AmesianX,项目名称:openssl,代码行数:35,代码来源:x509_lu.c
示例11: X509_PKEY_free
void X509_PKEY_free(X509_PKEY *x)
{
int i;
if (x == NULL)
return;
i = CRYPTO_add(&x->references, -1, CRYPTO_LOCK_X509_PKEY);
#ifdef REF_PRINT
REF_PRINT("X509_PKEY", x);
#endif
if (i > 0)
return;
#ifdef REF_CHECK
if (i < 0) {
fprintf(stderr, "X509_PKEY_free, bad reference count\n");
abort();
}
#endif
X509_ALGOR_free(x->enc_algor);
ASN1_OCTET_STRING_free(x->enc_pkey);
EVP_PKEY_free(x->dec_pkey);
if (x->key_free)
OPENSSL_free(x->key_data);
OPENSSL_free(x);
}
开发者ID:AndreV84,项目名称:openssl,代码行数:27,代码来源:x_pkey.c
示例12: RSA_free
void RSA_free(RSA *r)
{
int i;
if (r == NULL) return;
i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_RSA);
#ifdef REF_PRINT
REF_PRINT("RSA",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"RSA_free, bad reference count\n");
abort();
}
#endif
if (r->meth->finish)
r->meth->finish(r);
#ifndef OPENSSL_NO_ENGINE
if (r->engine)
ENGINE_finish(r->engine);
#endif
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
if (r->n != NULL) BN_clear_free(r->n);
if (r->e != NULL) BN_clear_free(r->e);
if (r->d != NULL) BN_clear_free(r->d);
if (r->p != NULL) BN_clear_free(r->p);
if (r->q != NULL) BN_clear_free(r->q);
if (r->dmp1 != NULL) BN_clear_free(r->dmp1);
if (r->dmq1 != NULL) BN_clear_free(r->dmq1);
if (r->iqmp != NULL) BN_clear_free(r->iqmp);
if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
if (r->additional_primes != NULL)
{
int j;
for (j = 0; j < sk_RSA_additional_prime_num(r->additional_primes); j++)
{
RSA_additional_prime *ap = sk_RSA_additional_prime_value(r->additional_primes, j);
BN_clear_free(ap->prime);
BN_clear_free(ap->exp);
BN_clear_free(ap->coeff);
BN_clear_free(ap->r);
}
sk_RSA_additional_prime_pop_free(r->additional_primes, int_rsa_free_additional_prime);
}
OPENSSL_free(r);
}
开发者ID:kaxtone,项目名称:appengine-php,代码行数:56,代码来源:rsa_lib.c
示例13: RSA_up_ref
int RSA_up_ref(RSA *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
#ifdef REF_PRINT
REF_PRINT("RSA",r);
#endif
#if 0//def REF_CHECK
if (i < 2)
{
abort();
}
#endif
return ((i > 1) ? 1 : 0);
}
开发者ID:4Fwolf,项目名称:motorola-hawk-kernel-3.4.67,代码行数:14,代码来源:rsa_lib.c
示例14: EC_KEY_up_ref
int EC_KEY_up_ref(EC_KEY *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_EC);
#ifdef REF_PRINT
REF_PRINT("EC_KEY", r);
#endif
#ifdef REF_CHECK
if (i < 2) {
fprintf(stderr, "EC_KEY_up, bad reference count\n");
abort();
}
#endif
return ((i > 1) ? 1 : 0);
}
开发者ID:GrayKing,项目名称:Leakfix-on-OpenSSL,代码行数:14,代码来源:ec_key.c
示例15: RSA_up_ref
int RSA_up_ref(RSA *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_RSA);
#ifdef REF_PRINT
REF_PRINT("RSA", r);
#endif
#ifdef REF_CHECK
if (i < 2) {
fprintf(stderr, "RSA_up_ref, bad reference count\n");
abort();
}
#endif
return ((i > 1) ? 1 : 0);
}
开发者ID:AndreV84,项目名称:openssl,代码行数:14,代码来源:rsa_lib.c
示例16: DH_up_ref
int DH_up_ref(DH *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DH);
#ifdef REF_PRINT
REF_PRINT("DH", r);
#endif
#ifdef REF_CHECK
if (i < 2) {
fprintf(stderr, "DH_up, bad reference count\n");
abort();
}
#endif
return ((i > 1) ? 1 : 0);
}
开发者ID:davidlt,项目名称:openssl-fedora,代码行数:14,代码来源:dh_lib.c
示例17: DH_up_ref
int DH_up_ref(DH *r)
{
int i = CRYPTO_add(&r->references, 1, CRYPTO_LOCK_DH);
#ifdef REF_PRINT
REF_PRINT("DH",r);
#endif
#ifdef REF_CHECK
if (i < 2)
{
TINYCLR_SSL_FPRINTF(OPENSSL_TYPE__FILE_STDERR, "DH_up, bad reference count\n");
TINYCLR_SSL_ABORT();
}
#endif
return ((i > 1) ? 1 : 0);
}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:15,代码来源:dh_lib.cpp
示例18: DSO_free
int DSO_free(DSO *dso)
{
int i;
if(dso == NULL)
{
DSOerr(DSO_F_DSO_FREE,ERR_R_PASSED_NULL_PARAMETER);
return(0);
}
i=CRYPTO_add(&dso->references,-1,CRYPTO_LOCK_DSO);
#ifdef REF_PRINT
REF_PRINT("DSO",dso);
#endif
if(i > 0) return(1);
#ifdef REF_CHECK
if(i < 0)
{
fprintf(stderr,"DSO_free, bad reference count\n");
abort();
}
#endif
if((dso->meth->dso_unload != NULL) && !dso->meth->dso_unload(dso))
{
DSOerr(DSO_F_DSO_FREE,DSO_R_UNLOAD_FAILED);
return(0);
}
if((dso->meth->finish != NULL) && !dso->meth->finish(dso))
{
DSOerr(DSO_F_DSO_FREE,DSO_R_FINISH_FAILED);
return(0);
}
sk_void_free(dso->meth_data);
if(dso->filename != NULL)
OPENSSL_free(dso->filename);
if(dso->loaded_filename != NULL)
OPENSSL_free(dso->loaded_filename);
OPENSSL_free(dso);
return(1);
}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:44,代码来源:dso_lib.c
示例19: STORE_store_public_key
int STORE_store_public_key(STORE *s, EVP_PKEY *data, OPENSSL_ITEM attributes[],
OPENSSL_ITEM parameters[])
{
STORE_OBJECT *object;
int i;
check_store(s,STORE_F_STORE_STORE_PUBLIC_KEY,
store_object,STORE_R_NO_STORE_OBJECT_FUNCTION);
object = STORE_OBJECT_new();
if (!object)
{
STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
ERR_R_MALLOC_FAILURE);
return 0;
}
object->data.key = EVP_PKEY_new();
if (!object->data.key)
{
STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
ERR_R_MALLOC_FAILURE);
return 0;
}
CRYPTO_add(&data->references,1,CRYPTO_LOCK_EVP_PKEY);
#ifdef REF_PRINT
REF_PRINT("EVP_PKEY",data);
#endif
object->data.key = data;
i = s->meth->store_object(s, STORE_OBJECT_TYPE_PUBLIC_KEY, object,
attributes, parameters);
STORE_OBJECT_free(object);
if (!i)
{
STOREerr(STORE_F_STORE_STORE_PUBLIC_KEY,
STORE_R_FAILED_STORING_KEY);
return 0;
}
return i;
}
开发者ID:Digt,项目名称:TrustedSSL,代码行数:43,代码来源:str_lib.c
示例20: RSA_free
void RSA_free(RSA *r)
{
int i;
if (r == NULL) return;
i=CRYPTO_add(&r->references,-1,CRYPTO_LOCK_RSA);
#ifdef REF_PRINT
REF_PRINT("RSA",r);
#endif
if (i > 0) return;
#ifdef REF_CHECK
if (i < 0)
{
fprintf(stderr,"RSA_free, bad reference count\n");
abort();
}
#endif
if (r->meth->finish)
r->meth->finish(r);
#ifndef OPENSSL_NO_ENGINE
if (r->engine)
ENGINE_finish(r->engine);
#endif
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_RSA, r, &r->ex_data);
if (r->n != NULL) BN_clear_free(r->n);
if (r->e != NULL) BN_clear_free(r->e);
if (r->d != NULL) BN_clear_free(r->d);
if (r->p != NULL) BN_clear_free(r->p);
if (r->q != NULL) BN_clear_free(r->q);
if (r->dmp1 != NULL) BN_clear_free(r->dmp1);
if (r->dmq1 != NULL) BN_clear_free(r->dmq1);
if (r->iqmp != NULL) BN_clear_free(r->iqmp);
#ifndef OPERA_SMALL_VERSION
if (r->blinding != NULL) BN_BLINDING_free(r->blinding);
if (r->mt_blinding != NULL) BN_BLINDING_free(r->mt_blinding);
if (r->bignum_data != NULL) OPENSSL_free_locked(r->bignum_data);
#endif
OPENSSL_free(r);
}
开发者ID:prestocore,项目名称:browser,代码行数:43,代码来源:rsa_lib.c
注:本文中的REF_PRINT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论