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

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

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

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

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

示例1: main

int main(int argc, char *argv[])	{			/* enable memory leak checking unless explicitly disabled */	if (!((getenv("OPENSSL_DEBUG_MEMORY") != NULL) && (0 == strcmp(getenv("OPENSSL_DEBUG_MEMORY"), "off"))))		{		CRYPTO_malloc_debug_init();		CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);		}	else		{		/* OPENSSL_DEBUG_MEMORY=off */		CRYPTO_set_mem_debug_functions(0, 0, 0, 0, 0);		}	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);	ERR_load_crypto_strings();	RAND_seed(rnd_seed, sizeof rnd_seed); /* or BN_generate_prime may fail */	prime_field_tests();	puts("");	char2_field_tests();	/* test the internal curves */	internal_curve_test();#ifndef OPENSSL_NO_ENGINE	ENGINE_cleanup();#endif	CRYPTO_cleanup_all_ex_data();	ERR_free_strings();	ERR_remove_state(0);	CRYPTO_mem_leaks_fp(stderr);		return 0;	}
开发者ID:174high,项目名称:openssl-0.9.8e_linux_porting,代码行数:35,


示例2: main

int main(int argc, char *argv[]) {    int err;    struct shouter app;    libre_init();    err = tcsound_alloc(&app.sound, asend, &app);    if(err != 0)        goto fail;    err = rtp_io_alloc(&app.rtp, FMT_SPEEX);    if(err != 0)        goto close_sound;    tcsound_start(app.sound);    re_main(signal_handler);close_sound:    mem_deref(app.sound);fail:    tmr_debug();    mem_debug();    ENGINE_cleanup();fail_sound:    libre_close();}
开发者ID:labdong801,项目名称:tcsip,代码行数:29,


示例3: cleanup

void cleanup(struct soap* soap) {  /* release our connection and context */  xmpp_conn_release(conn);  xmpp_ctx_free(ctx);    /* final shutdown of the library */  xmpp_shutdown();  if (rsa_private_key) {    EVP_PKEY_free(rsa_private_key);  }  if (cert) {    X509_free(cert);  }  if (soap) {    soap_end(soap);    soap_done(soap);    soap_free(soap);  }    ERR_remove_state(0);  ENGINE_cleanup();  CONF_modules_unload(1);  ERR_free_strings();  EVP_cleanup();  CRYPTO_cleanup_all_ex_data();}
开发者ID:abidinz,项目名称:Stormee,代码行数:30,


示例4: main

int main(int argc, char **argv)	{	BIO *bio_err;	X509_REQ *req=NULL;	EVP_PKEY *pkey=NULL;	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);	bio_err=BIO_new_fp(stderr, BIO_NOCLOSE);	mkreq(&req,&pkey,512,0,365);	RSA_print_fp(stdout,pkey->pkey.rsa,0);	X509_REQ_print_fp(stdout,req);	PEM_write_X509_REQ(stdout,req);	X509_REQ_free(req);	EVP_PKEY_free(pkey);#ifndef OPENSSL_NO_ENGINE	ENGINE_cleanup();#endif	CRYPTO_cleanup_all_ex_data();	CRYPTO_mem_leaks(bio_err);	BIO_free(bio_err);	return(0);	}
开发者ID:LucidOne,项目名称:Rovio,代码行数:29,


示例5: crypto_uninit_lib

voidcrypto_uninit_lib (void){#ifndef ENABLE_SSL  /* If SSL is enabled cleanup is taken care of in ssl_openssl.c */  EVP_cleanup ();#ifndef ENABLE_SMALL  ERR_free_strings ();#endif#endif#ifdef CRYPTO_MDEBUG  FILE* fp = fopen ("sdlog", "w");  ASSERT (fp);  CRYPTO_mem_leaks_fp (fp);  fclose (fp);#endif#if HAVE_OPENSSL_ENGINE  if (engine_initialized)    {      ENGINE_cleanup ();      engine_persist = NULL;      engine_initialized = false;    }#endif}
开发者ID:AllardJ,项目名称:Tomato,代码行数:27,


示例6: curl_global_cleanup

//----------------------------------------------------------------//void moaicore::SystemFinalize () {	MOAIGlobalsMgr::Finalize ();		#if USE_CURL		curl_global_cleanup ();	#endif		#if USE_OPENSSL		#ifndef OPENSSL_NO_ENGINE			ENGINE_cleanup ();		#endif				CONF_modules_unload ( 1 );				#ifndef OPENSSL_NO_ERR			ERR_free_strings ();		#endif				EVP_cleanup ();		CRYPTO_cleanup_all_ex_data ();	#endif		zl_cleanup ();}
开发者ID:RurouniGPL,项目名称:moai-dev,代码行数:26,


示例7: xmlSecOpenSSLAppShutdown

/** * xmlSecOpenSSLAppShutdown: * * General crypto engine shutdown. This function is used * by XMLSec command line utility and called after * @xmlSecShutdown function. * * Returns: 0 on success or a negative value otherwise. */intxmlSecOpenSSLAppShutdown(void) {    xmlSecOpenSSLAppSaveRANDFile(NULL);    RAND_cleanup();    EVP_cleanup();#ifndef XMLSEC_NO_X509    X509_TRUST_cleanup();#endif /* XMLSEC_NO_X509 */    ENGINE_cleanup();    CONF_modules_unload(1);    CRYPTO_cleanup_all_ex_data();    /* finally cleanup errors */#if defined(XMLSEC_OPENSSL_110)    ERR_remove_thread_state();#elif defined(XMLSEC_OPENSSL_100)    ERR_remove_thread_state(NULL);#else    ERR_remove_state(0);#endif /* defined(XMLSEC_OPENSSL_100) || defined(XMLSEC_OPENSSL_110) */    ERR_free_strings();    /* done */    return(0);}
开发者ID:symma,项目名称:xmlsec,代码行数:39,


示例8: as_tls_cleanup

voidas_tls_cleanup(void){	// Skip if we were never initialized.	if (! s_tls_inited) {		return;	}#if !defined USE_XDR	// Cleanup global OpenSSL state, must be after all other OpenSSL	// API calls, of course ...#if OPENSSL_VERSION_NUMBER < 0x10100000L	threading_cleanup();#endif	// https://wiki.openssl.org/index.php/Library_Initialization#Cleanup	//	FIPS_mode_set(0);	ENGINE_cleanup();	CONF_modules_unload(1);	EVP_cleanup();	as_tls_thread_cleanup();	CRYPTO_cleanup_all_ex_data();	ERR_free_strings();	// http://stackoverflow.com/questions/29845527/how-to-properly-uninitialize-openssl	STACK_OF(SSL_COMP) *ssl_comp_methods = SSL_COMP_get_compression_methods();	if (ssl_comp_methods != NULL) {        sk_SSL_COMP_free(ssl_comp_methods);	}#endif}
开发者ID:aerospike,项目名称:aerospike-client-c,代码行数:33,


示例9: ssl_cleanup_pre_config

/* *  the various processing hooks */static apr_status_t ssl_cleanup_pre_config(void *data){    /*     * Try to kill the internals of the SSL library.     */    /* Corresponds to OPENSSL_load_builtin_modules():     * XXX: borrowed from apps.h, but why not CONF_modules_free()     * which also invokes CONF_modules_finish()?     */    CONF_modules_unload(1);    /* Corresponds to SSL_library_init: */    EVP_cleanup();#if HAVE_ENGINE_LOAD_BUILTIN_ENGINES    ENGINE_cleanup();#endif    ERR_remove_state(0);    /* Don't call ERR_free_strings here; ERR_load_*_strings only     * actually load the error strings once per process due to static     * variable abuse in OpenSSL. */    /* Also don't call CRYPTO_cleanup_all_ex_data here; any registered     * ex_data indices may have been cached in static variables in     * OpenSSL; removing them may cause havoc.  Notably, with OpenSSL     * versions >= 0.9.8f, COMP_CTX cleanups would not be run, which     * could result in a per-connection memory leak (!). */    /*     * TODO: determine somewhere we can safely shove out diagnostics     *       (when enabled) at this late stage in the game:     * CRYPTO_mem_leaks_fp(stderr);     */    return APR_SUCCESS;}
开发者ID:Aimbot2,项目名称:apache2,代码行数:37,


示例10: Curl_SSL_cleanup

/* Global cleanup */void Curl_SSL_cleanup(void){#ifdef USE_SSLEAY  if(init_ssl) {    /* only cleanup if we did a previous init */    /* Free the SSL error strings */    ERR_free_strings();    /* EVP_cleanup() removes all ciphers and digests from the       table. */    EVP_cleanup();#ifdef HAVE_ENGINE_cleanup    ENGINE_cleanup();#endif#ifdef HAVE_CRYPTO_CLEANUP_ALL_EX_DATA    /* this function was not present in 0.9.6b, but was added sometimes       later */    CRYPTO_cleanup_all_ex_data();#endif    init_ssl=0; /* not inited any more */  }#else  /* SSL disabled, do nothing */#endif}
开发者ID:yyyyyao,项目名称:Slicer3-lib-mirrors,代码行数:30,


示例11: main

int main(int argc, char **argv){    int i;    testdata *test = test_cases;    CRYPTO_malloc_debug_init();    CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL);    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);    OpenSSL_add_all_digests();# ifndef OPENSSL_NO_ENGINE    ENGINE_load_builtin_engines();    ENGINE_register_all_digests();# endif    printf("PKCS5_PBKDF2_HMAC() tests ");    for (i = 0; test->pass != NULL; i++, test++) {        test_p5_pbkdf2(i, "sha1", test, sha1_results[i]);        test_p5_pbkdf2(i, "sha256", test, sha256_results[i]);        test_p5_pbkdf2(i, "sha512", test, sha512_results[i]);        printf(".");    }    printf(" done/n");# ifndef OPENSSL_NO_ENGINE    ENGINE_cleanup();# endif    EVP_cleanup();    CRYPTO_cleanup_all_ex_data();    ERR_remove_thread_state(NULL);    ERR_free_strings();    CRYPTO_mem_leaks_fp(stderr);    return 0;}
开发者ID:375670450,项目名称:openssl,代码行数:34,


示例12: openssl_cleanup

static void openssl_cleanup(void){	ENGINE_cleanup();	ERR_free_strings();	CRYPTO_cleanup_all_ex_data();	EVP_cleanup();}
开发者ID:bensteinfeld,项目名称:john-the-ripper,代码行数:7,


示例13: load_engine

static int load_engine(void **ctx,MESSAGE *msg){	int i;	ENGINE **e=(ENGINE **)ctx;	ENGINE_load_dynamic();	if(!(*e=ENGINE_by_id("dynamic")))goto err1;	if(!ENGINE_ctrl_cmd_string(*e,"SO_PATH",msg->engine,0))goto err2;	for(i=0;pkcs11[i].name;i++)		if(!ENGINE_ctrl_cmd_string(*e,pkcs11[i].name,pkcs11[i].value,0))			goto err2;	if(!ENGINE_ctrl_cmd_string(*e,"MODULE_PATH",msg->pkcs11,0))goto err2;	if(msg->nopin)if(!ENGINE_ctrl_cmd_string(*e,"NOLOGIN","1",0))goto err2;	if(!ENGINE_ctrl_cmd_string(*e,"PIN",msg->nopin?"":msg->pin,0))goto err2;	if(!ENGINE_init(*e))	{err2:		ENGINE_free(*e);err1:		ENGINE_cleanup();		return ENGFAIL;	}	ENGINE_free(*e);	ENGINE_set_default(*e,ENGINE_METHOD_ALL&~ENGINE_METHOD_RAND);	return OK;}
开发者ID:not1337,项目名称:pam_pivcard,代码行数:29,


示例14: main

int main(int argc, char *argv[]){	BIO *bio_err = NULL;	SSL_library_init();	SSL_load_error_strings();	ERR_load_crypto_strings();	/* error write context */	bio_err = BIO_new_fp(stderr, BIO_NOCLOSE);	const SSL_METHOD *meth = SSLv23_method();	SSL_CTX *ctx = SSL_CTX_new(meth);	/***/	BIO_free(bio_err);	ERR_free_strings();	ERR_remove_state(0);	ENGINE_cleanup();	CONF_modules_free();	EVP_cleanup();	CRYPTO_cleanup_all_ex_data();	return 0;}
开发者ID:ChenKaiJung,项目名称:HTTPing,代码行数:29,


示例15: main

int main(int argc, char **argv)	{	BIO *bio_err;	X509 *x509=NULL;	EVP_PKEY *pkey=NULL;	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);	bio_err=BIO_new_fp(stderr, BIO_NOCLOSE);	mkcert(&x509,&pkey,512,0,365);	RSA_print_fp(stdout,pkey->pkey.rsa,0);	X509_print_fp(stdout,x509);	PEM_write_PrivateKey(stdout,pkey,NULL,NULL,0,NULL, NULL);	PEM_write_X509(stdout,x509);	X509_free(x509);	EVP_PKEY_free(pkey);#ifndef OPENSSL_NO_ENGINE	ENGINE_cleanup();#endif	CRYPTO_cleanup_all_ex_data();	CRYPTO_mem_leaks(bio_err);	BIO_free(bio_err);	return(0);	}
开发者ID:0culus,项目名称:openssl,代码行数:30,


示例16: unload_engine

static void unload_engine(void *ctx){	ENGINE *e=(ENGINE *)ctx;	ENGINE_finish(e);	ENGINE_cleanup();}
开发者ID:not1337,项目名称:pam_pivcard,代码行数:7,


示例17: crypto_shutdown

/** * Shutdown the crypto library and release resources. */static apr_status_t crypto_shutdown(void){    ERR_free_strings();    EVP_cleanup();    ENGINE_cleanup();    return APR_SUCCESS;}
开发者ID:ATCP,项目名称:mtcp,代码行数:10,


示例18: ssl_fini

/* * Deinitialize OpenSSL and free as much memory as possible. * Some 10k-100k will still remain resident no matter what. */voidssl_fini(void){	if (!ssl_initialized)		return;	ERR_remove_state(0); /* current thread */#ifdef OPENSSL_THREADS	CRYPTO_set_locking_callback(NULL);	CRYPTO_set_dynlock_create_callback(NULL);	CRYPTO_set_dynlock_lock_callback(NULL);	CRYPTO_set_dynlock_destroy_callback(NULL);#ifdef OPENSSL_NO_THREADID	CRYPTO_set_id_callback(NULL);#else /* !OPENSSL_NO_THREADID */	CRYPTO_THREADID_set_callback(NULL);#endif /* !OPENSSL_NO_THREADID */	int i;	for (i = 0; i < ssl_mutex_num; i++) {		pthread_mutex_destroy(&ssl_mutex[i]);	}	free(ssl_mutex);#endif	ENGINE_cleanup();	CONF_modules_finish();	CONF_modules_unload(1);	CONF_modules_free();	EVP_cleanup();	ERR_free_strings();	CRYPTO_cleanup_all_ex_data();}
开发者ID:caidongyun,项目名称:backup,代码行数:39,


示例19: mysql_server_end

/*   Release SSL and free resources   Will be automatically executed by    mysql_server_end() function   SYNOPSIS     my_ssl_end()       void   RETURN VALUES     void*/void my_ssl_end(){  DBUG_ENTER("my_ssl_end");  pthread_mutex_lock(&LOCK_ssl_config);  if (my_ssl_initialized)  {    int i;    CRYPTO_set_locking_callback(NULL);		CRYPTO_set_id_callback(NULL);    for (i=0; i < CRYPTO_num_locks(); i++)      pthread_mutex_destroy(&LOCK_crypto[i]);    my_free((gptr)LOCK_crypto, MYF(0));    if (SSL_context)    {      SSL_CTX_free(SSL_context);      SSL_context= FALSE;    }    ERR_remove_state(0);    EVP_cleanup();    CRYPTO_cleanup_all_ex_data();    ERR_free_strings();    ENGINE_cleanup();    CONF_modules_free();    CONF_modules_unload(1);    sk_SSL_COMP_free(SSL_COMP_get_compression_methods());    my_ssl_initialized= FALSE;  }  pthread_mutex_unlock(&LOCK_ssl_config);  pthread_mutex_destroy(&LOCK_ssl_config);  DBUG_VOID_RETURN;}
开发者ID:bsmr-mariadb,项目名称:connector-c,代码行数:45,


示例20: CleanupThreadState

CSSLInitializer::~CSSLInitializer(){	CleanupThreadState();#if OPENSSL_VERSION_NUMBER < OPENSSL_VERSION_1_1_0	CONF_modules_free();	ENGINE_cleanup();	EVP_cleanup();	CRYPTO_cleanup_all_ex_data();	ERR_free_strings();	SSL_COMP_free_compression_methods();	CRYPTO_set_locking_callback			(nullptr);	CRYPTO_set_dynlock_create_callback	(nullptr);	CRYPTO_set_dynlock_destroy_callback	(nullptr);	CRYPTO_set_dynlock_lock_callback	(nullptr);	if(sm_iLockNum > 0)	{		delete[] sm_pcsLocks;		sm_pcsLocks = nullptr;		sm_iLockNum = 0;	}#endif}
开发者ID:MarkYangUp,项目名称:HP-Socket,代码行数:26,


示例21: DEBUG

Environment::~Environment(){    DEBUG( "env: dtor: shutting down OpenSSL" );    EVP_cleanup();    ENGINE_cleanup();    DEBUG( "env: dtor: done" );}
开发者ID:Agnara,项目名称:openssl-pkcs11-samples,代码行数:8,


示例22: ossl_engine_s_cleanup

static VALUEossl_engine_s_cleanup(VALUE self){#if defined(HAVE_ENGINE_CLEANUP)    ENGINE_cleanup();#endif    return Qnil;}
开发者ID:Emily,项目名称:rubinius,代码行数:8,


示例23: krx_end

void krx_end() {  ERR_remove_state(0);  ENGINE_cleanup();  CONF_modules_unload(1);  ERR_free_strings();  EVP_cleanup();  sk_SSL_COMP_free(SSL_COMP_get_compression_methods());  CRYPTO_cleanup_all_ex_data();}
开发者ID:roxlu,项目名称:krx_rtc,代码行数:9,


示例24: openssl_shutdown

void openssl_shutdown(bool threaded) {#ifndef OPENSSL_NO_ENGINE  ENGINE_cleanup();#endif  if (threaded) {    pthreads_locking_cleanup();  }}
开发者ID:rfjakob,项目名称:encfs,代码行数:9,


示例25: BSslFreeOSSL

static void BSslFreeOSSL(void){	ERR_remove_state(0);#ifndef OPENSSL_NO_ENGINE	ENGINE_cleanup();#endif	CRYPTO_cleanup_all_ex_data();	ERR_free_strings();	EVP_cleanup();}
开发者ID:linkclau,项目名称:XMail,代码行数:10,


示例26: openssl_cleanup

void openssl_cleanup(){    CONF_modules_unload(1);    OBJ_cleanup();    EVP_cleanup();    ENGINE_cleanup();    CRYPTO_cleanup_all_ex_data();    ERR_remove_state(0);    ERR_free_strings();}
开发者ID:viktorTarasov,项目名称:has,代码行数:10,


示例27: unload_hardware_engine

/* Free memory for the hardware engine */static void unload_hardware_engine () {  if (!reng)    return;  ENGINE_finish (reng);  ENGINE_free (reng);  ENGINE_cleanup ();  reng = NULL;  rand_loaded = 0;}
开发者ID:cjcole,项目名称:libgolle,代码行数:11,


示例28: zdb_finalize

voidzdb_finalize(){    if(!zdb_init_done)    {        return;    }    zdb_init_done = FALSE;#if ZDB_DNSSEC_SUPPORT != 0    dnssec_keystore_destroy();    dnssec_keystore_resetpath();#endif#if ZDB_OPENSSL_SUPPORT!=0    ERR_remove_state(0);    /* Init openssl */    CRYPTO_set_locking_callback(NULL);    CRYPTO_set_id_callback(NULL);    int i;    for(i = 0; i < ssl_mutex_count; i++)    {        pthread_mutex_destroy(&ssl_mutex[i]);    }    free(ssl_mutex);    ENGINE_cleanup();#endif    logger_stop();#if ZDB_USE_THREADPOOL != 0    /*     *  The default value for the database.     *  This initialization will do nothing if it has already been done.     *     *  The server will have to do it before calling zdb_init();     *     */    if(thread_pool_initialized_by_zdb)    {        thread_pool_destroy();    }#endif}
开发者ID:koodaamo,项目名称:yadifa,代码行数:55,



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


C++ ENGINE_finish函数代码示例
C++ ENGINE_by_id函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。