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


C++ ENGINE_register_all_complete函数代码示例

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


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

示例1: init_openssl

static void init_openssl(void)
{
    atexit(fini_openssl);
    OpenSSL_add_all_algorithms();
    ENGINE_load_builtin_engines();
    ENGINE_register_all_complete();
}
开发者ID:dreamsxin,项目名称:eis,代码行数:7,代码来源:libmain.c

示例2: tor_init

void
tor_init (void)
{
	if (initialized) {
		return;
	}

	ERR_load_crypto_strings();
	OpenSSL_add_all_algorithms();

	// enable proper threading
	locks.length = CRYPTO_num_locks();
	locks.item   = malloc(locks.length * sizeof(uv_mutex_t));

	for (size_t i = 0; i < locks.length; i++) {
		uv_mutex_init(&locks.item[i]);
	}

	CRYPTO_set_locking_callback(_locking_callback);
	CRYPTO_set_id_callback(uv_thread_self);
	CRYPTO_set_dynlock_create_callback(_dynlock_create_callback);
	CRYPTO_set_dynlock_lock_callback(_dynlock_lock_callback);
	CRYPTO_set_dynlock_destroy_callback(_dynlock_destroy_callback);

	ENGINE_load_builtin_engines();
	ENGINE_register_all_complete();

	initialized = true;
}
开发者ID:postfix,项目名称:libtor,代码行数:29,代码来源:tor.c

示例3: ENGINE_load_builtin_engines

void ENGINE_load_builtin_engines(void)
	{
	/* Some ENGINEs need this */
	OPENSSL_cpuid_setup();
#if 0
	/* There's no longer any need for an "openssl" ENGINE unless, one day,
	 * it is the *only* way for standard builtin implementations to be be
	 * accessed (ie. it would be possible to statically link binaries with
	 * *no* builtin implementations). */
	ENGINE_load_openssl();
#endif
#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV))
	ENGINE_load_cryptodev();
#endif
#ifndef OPENSSL_NO_RDRAND
	ENGINE_load_rdrand();
#endif
	ENGINE_load_dynamic();
#ifndef OPENSSL_NO_STATIC_ENGINE
#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_4758_CCA
	ENGINE_load_4758cca();
#endif
#ifndef OPENSSL_NO_HW_AEP
	ENGINE_load_aep();
#endif
#ifndef OPENSSL_NO_HW_ATALLA
	ENGINE_load_atalla();
#endif
#ifndef OPENSSL_NO_HW_CSWIFT
	ENGINE_load_cswift();
#endif
#ifndef OPENSSL_NO_HW_NCIPHER
	ENGINE_load_chil();
#endif
#ifndef OPENSSL_NO_HW_NURON
	ENGINE_load_nuron();
#endif
#ifndef OPENSSL_NO_HW_SUREWARE
	ENGINE_load_sureware();
#endif
#ifndef OPENSSL_NO_HW_UBSEC
	ENGINE_load_ubsec();
#endif
#ifndef OPENSSL_NO_HW_PADLOCK
	ENGINE_load_padlock();
#endif
#endif
#ifndef OPENSSL_NO_GOST
	ENGINE_load_gost();
#endif
#ifndef OPENSSL_NO_GMP
	ENGINE_load_gmp();
#endif
#if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
	ENGINE_load_capi();
#endif
#endif
	ENGINE_register_all_complete();
	}
开发者ID:0culus,项目名称:openssl,代码行数:60,代码来源:eng_all.c

示例4: malloc

void BTCTrader::signRequest ( QString* header, QNetworkRequest* newRequest )
{
    nonce += 1;
    *header = ( header->length() == 0 ) ? "nonce=" + QString::number( nonce ) : "nonce=" + QString::number( nonce ) + "&" + *header;

    QByteArray key = QByteArray::fromBase64( restSign.toStdString().c_str() );
    unsigned char* result;
    unsigned int result_len = 512;
    HMAC_CTX ctx;

    result = (unsigned char*) malloc(sizeof(unsigned char) * result_len);

    ENGINE_load_builtin_engines();
    ENGINE_register_all_complete();

    HMAC_CTX_init(&ctx);
    HMAC_Init_ex(&ctx, key.constData(), key.length(), EVP_sha512(), NULL);
    HMAC_Update(&ctx, (unsigned char*)header->toAscii().constData(), header->length());
    HMAC_Final(&ctx, result, &result_len);
    HMAC_CTX_cleanup(&ctx);

    newRequest->setRawHeader( "Rest-Key", restKey.toStdString().c_str() );
    newRequest->setRawHeader( "Rest-Sign", QByteArray::fromRawData( (char*)result, result_len ).toBase64() );
    newRequest->setRawHeader( "content-type","application/x-www-form-urlencoded" );
    free ( result );
}
开发者ID:blackish,项目名称:GoxMobile,代码行数:26,代码来源:btctrader.cpp

示例5: setup_engine

static ENGINE *
setup_engine (const char *engine)
{
  ENGINE *e = NULL;

  ENGINE_load_builtin_engines ();

  if (engine)
    {
      if (strcmp (engine, "auto") == 0)
	{
	  msg (M_INFO, "Initializing OpenSSL auto engine support");
	  ENGINE_register_all_complete ();
	  return NULL;
	}
      if ((e = ENGINE_by_id (engine)) == NULL
	 && (e = try_load_engine (engine)) == NULL)
	{
	  msg (M_FATAL, "OpenSSL error: cannot load engine '%s'", engine);
	}

      if (!ENGINE_set_default (e, ENGINE_METHOD_ALL))
	{
	  msg (M_FATAL, "OpenSSL error: ENGINE_set_default failed on engine '%s'",
	       engine);
	}

      msg (M_INFO, "Initializing OpenSSL support for engine '%s'",
	   ENGINE_get_id (e));
    }
  return e;
}
开发者ID:AllardJ,项目名称:Tomato,代码行数:32,代码来源:crypto_openssl.c

示例6: ENGINE_load_builtin_engines

void ENGINE_load_builtin_engines(void)
{
    /* Some ENGINEs need this */
    OPENSSL_cpuid_setup();
#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV))
# ifdef ENGINE_load_cryptodev
    ENGINE_load_cryptodev();
# endif
#endif
#ifndef OPENSSL_NO_RDRAND
# ifdef ENGINE_load_rdrand
    ENGINE_load_rdrand();
# endif
#endif
# ifdef ENGINE_load_dynamic
    ENGINE_load_dynamic();
# endif
#ifndef OPENSSL_NO_STATIC_ENGINE
# ifndef OPENSSL_NO_HW
#  ifndef OPENSSL_NO_HW_PADLOCK
#   ifdef ENGINE_load_padlock
    ENGINE_load_padlock();
#   endif
#  endif
# endif
# if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
#  ifdef ENGINE_load_capi
    ENGINE_load_capi();
#  endif
# endif
#endif
    ENGINE_register_all_complete();
}
开发者ID:echenonline,项目名称:openssl,代码行数:33,代码来源:eng_all.c

示例7: openssl_init

void openssl_init(bool threaded)
{
    // initialize the SSL library
    SSL_load_error_strings();
    SSL_library_init();

    unsigned int randSeed = 0;
    RAND_bytes( (unsigned char*)&randSeed, sizeof(randSeed) );
    srand( randSeed );

#ifndef OPENSSL_NO_ENGINE
    /* Load all bundled ENGINEs into memory and make them visible */
    ENGINE_load_builtin_engines();
    /* Register all of them for every algorithm they collectively implement */
    ENGINE_register_all_complete();
#endif // NO_ENGINE

    if(threaded)
    {
	// provide locking functions to OpenSSL since we'll be running with
	// threads accessing openssl in parallel.
	CRYPTO_set_id_callback( threads_thread_id );
	CRYPTO_set_locking_callback( threads_locking_callback );
    }
}
开发者ID:florentchandelier,项目名称:EncFSMP,代码行数:25,代码来源:openssl.cpp

示例8: ENGINE_load_builtin_engines

void ENGINE_load_builtin_engines(void)
	{
	/* Some ENGINEs need this */
	OPENSSL_cpuid_setup();
#if 0
	/* There's no longer any need for an "openssl" ENGINE unless, one day,
	 * it is the *only* way for standard builtin implementations to be be
	 * accessed (ie. it would be possible to statically link binaries with
	 * *no* builtin implementations). */
	ENGINE_load_openssl();
#endif
#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV))
	ENGINE_load_cryptodev();
#endif
#ifndef OPENSSL_NO_RSAX
	ENGINE_load_rsax();
#endif
#ifndef OPENSSL_NO_RDRAND
	ENGINE_load_rdrand();
#endif
	ENGINE_load_dynamic();
#ifndef OPENSSL_NO_STATIC_ENGINE
#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_PADLOCK
	ENGINE_load_padlock();
#endif
#endif
#ifndef OPENSSL_NO_GOST
	ENGINE_load_gost();
#endif
#endif
	ENGINE_register_all_complete();
	}
开发者ID:jmhodges,项目名称:libssl,代码行数:33,代码来源:eng_all.c

示例9: QBox_MakeUpToken

char* QBox_MakeUpToken(const QBox_AuthPolicy* auth)
{
	char* uptoken;
	char* policy_str;
	char* encoded_digest;
	char* encoded_policy_str;
	char digest[EVP_MAX_MD_SIZE + 1];
	unsigned int dgtlen = sizeof(digest);

	HMAC_CTX ctx;

	ENGINE_load_builtin_engines();
	ENGINE_register_all_complete();

	policy_str = QBox_AuthPolicy_json(auth);
	encoded_policy_str = QBox_String_Encode(policy_str);
	free(policy_str);

	bzero(digest, sizeof(digest));

	HMAC_CTX_init(&ctx);
	HMAC_Init_ex(&ctx, QBOX_SECRET_KEY, strlen(QBOX_SECRET_KEY), EVP_sha1(), NULL);
	HMAC_Update(&ctx, encoded_policy_str, strlen(encoded_policy_str));
	HMAC_Final(&ctx, digest, &dgtlen);
	HMAC_CTX_cleanup(&ctx);

	encoded_digest = QBox_Memory_Encode(digest, dgtlen);
	uptoken = QBox_String_Concat(QBOX_ACCESS_KEY, ":", encoded_digest, ":", encoded_policy_str, NULL);
	free(encoded_policy_str);
	free(encoded_digest);

	return uptoken;
}
开发者ID:WadeLeng,项目名称:c-sdk,代码行数:33,代码来源:auth_policy.c

示例10: ENGINE_setup_bsd_cryptodev

void ENGINE_setup_bsd_cryptodev(void) {
	static int bsd_cryptodev_default_loaded = 0;
	if (!bsd_cryptodev_default_loaded) {
		ENGINE_load_cryptodev();
		ENGINE_register_all_complete();
	}
	bsd_cryptodev_default_loaded=1;
}
开发者ID:jmhodges,项目名称:libssl,代码行数:8,代码来源:eng_all.c

示例11: _libssh2_openssl_crypto_init

void _libssh2_openssl_crypto_init(void)
{
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
    ENGINE_load_builtin_engines();
    ENGINE_register_all_complete();
#else
    OpenSSL_add_all_algorithms();
    OpenSSL_add_all_ciphers();
    ENGINE_load_builtin_engines();
    ENGINE_register_all_complete();
#endif
#ifndef HAVE_EVP_AES_128_CTR
    _libssh2_EVP_aes_128_ctr();
    _libssh2_EVP_aes_192_ctr();
    _libssh2_EVP_aes_256_ctr();
#endif
}
开发者ID:stinb,项目名称:libssh2,代码行数:17,代码来源:openssl.c

示例12: ENGINE_setup_openbsd

void ENGINE_setup_openbsd(void) {
	static int openbsd_default_loaded = 0;
	if (!openbsd_default_loaded) {
		ENGINE_load_cryptodev();
		ENGINE_register_all_complete();
	}
	openbsd_default_loaded=1;
}
开发者ID:xyzy,项目名称:mips-openssl_0.9.7,代码行数:8,代码来源:eng_all.c

示例13: ssh_SSLeay_add_all_algorithms

void
ssh_SSLeay_add_all_algorithms(void)
{
	SSLeay_add_all_algorithms();

	/* Enable use of crypto hardware */
	ENGINE_load_builtin_engines();
	ENGINE_register_all_complete();
}
开发者ID:jogindersingh1985,项目名称:openssha,代码行数:9,代码来源:openssl-compat.c

示例14: ENGINE_load_builtin_engines

void ENGINE_load_builtin_engines(void)
{
    /* Some ENGINEs need this */
    OPENSSL_cpuid_setup();
#if !defined(OPENSSL_NO_HW) && (defined(__OpenBSD__) || defined(__FreeBSD__) || defined(HAVE_CRYPTODEV))
    ENGINE_load_cryptodev();
#endif
#ifndef OPENSSL_NO_RDRAND
    ENGINE_load_rdrand();
#endif
    ENGINE_load_dynamic();
#ifndef OPENSSL_NO_STATIC_ENGINE
# ifndef OPENSSL_NO_HW
#  ifndef OPENSSL_NO_HW_4758_CCA
    ENGINE_load_4758cca();
#  endif
/*-
 * These engines have been disabled as they do not currently build
#ifndef OPENSSL_NO_HW_AEP
        ENGINE_load_aep();
#endif
#ifndef OPENSSL_NO_HW_ATALLA
        ENGINE_load_atalla();
#endif
#ifndef OPENSSL_NO_HW_CSWIFT
        ENGINE_load_cswift();
#endif
#ifndef OPENSSL_NO_HW_NCIPHER
        ENGINE_load_chil();
#endif
#ifndef OPENSSL_NO_HW_NURON
        ENGINE_load_nuron();
#endif
#ifndef OPENSSL_NO_HW_SUREWARE
        ENGINE_load_sureware();
#endif
#ifndef OPENSSL_NO_HW_UBSEC
        ENGINE_load_ubsec();
#endif
*/
#  ifndef OPENSSL_NO_HW_PADLOCK
    ENGINE_load_padlock();
#  endif
# endif
# ifndef OPENSSL_NO_GOST
    ENGINE_load_gost();
# endif
# ifndef OPENSSL_NO_GMP
    ENGINE_load_gmp();
# endif
# if defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_NO_CAPIENG)
    ENGINE_load_capi();
# endif
#endif
    ENGINE_register_all_complete();
}
开发者ID:375670450,项目名称:openssl,代码行数:56,代码来源:eng_all.c

示例15: ca_sslinit

void
ca_sslinit(void)
{
	OpenSSL_add_all_algorithms();
	ERR_load_crypto_strings();

	/* Init hardware crypto engines. */
	ENGINE_load_builtin_engines();
	ENGINE_register_all_complete();
}
开发者ID:ajinkya93,项目名称:OpenBSD,代码行数:10,代码来源:ca.c


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