• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ENGINE_add函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: engine_add_nif

ERL_NIF_TERM engine_add_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Engine) */
#ifdef HAS_ENGINE_SUPPORT
    struct engine_ctx *ctx;

    // Get Engine
    ASSERT(argc == 1);

    if (!enif_get_resource(env, argv[0], engine_ctx_rtype, (void**)&ctx))
        goto bad_arg;

    if (!ENGINE_add(ctx->engine))
        goto failed;

    return atom_ok;

 bad_arg:
    return enif_make_badarg(env);

 failed:
    return ERROR_Atom(env, "add_engine_failed");

#else
    return atom_notsup;
#endif
}
开发者ID:bjorng,项目名称:otp,代码行数:26,代码来源:engine.c


示例2: openssl_engine_add

static int openssl_engine_add(lua_State*L)
{
  ENGINE* eng = CHECK_OBJECT(1, ENGINE, "openssl.engine");
  int ret = ENGINE_add(eng);
  lua_pushboolean(L, ret);
  return 1;
}
开发者ID:sdgdsffdsfff,项目名称:lua-openssl,代码行数:7,代码来源:engine.c


示例3: ENGINE_load_gost

void ENGINE_load_gost(void)
{
    ENGINE *toadd =engine_gost();
    if (!toadd) return;
    ENGINE_add(toadd);
    ENGINE_free(toadd);
    ERR_clear_error();
}
开发者ID:koson,项目名称:.NETMF_for_LPC17xx,代码行数:8,代码来源:gost_eng.cpp


示例4: ENGINE_load_4758cca

void ENGINE_load_4758cca(void)
	{
	ENGINE *e_4758 = engine_4758_cca();
	if (!e_4758) return;
	ENGINE_add(e_4758);
	ENGINE_free(e_4758);
	ERR_clear_error();   
	}
开发者ID:Sorcha,项目名称:NETMF-LPC,代码行数:8,代码来源:e_4758cca.cpp


示例5: ENGINE_load_ubsec

void ENGINE_load_ubsec(void)
	{
	/* Copied from eng_[openssl|dyn].c */
	ENGINE *toadd = engine_ubsec();
	if(!toadd) return;
	ENGINE_add(toadd);
	ENGINE_free(toadd);
	ERR_clear_error();
	}
开发者ID:EddieGarmon,项目名称:netduino-netmf,代码行数:9,代码来源:e_ubsec.cpp


示例6: engine_load_dasync_int

void engine_load_dasync_int(void)
{
    ENGINE *toadd = engine_dasync();
    if (!toadd)
        return;
    ENGINE_add(toadd);
    ENGINE_free(toadd);
    ERR_clear_error();
}
开发者ID:1234-,项目名称:openssl,代码行数:9,代码来源:e_dasync.c


示例7: LoadEngine

    static ENGINE* LoadEngine()
    {
      // This function creates an engine for PKCS#11 and inspired by
      // the "ENGINE_load_dynamic" function from OpenSSL, in file
      // "crypto/engine/eng_dyn.c"

      ENGINE* engine = ENGINE_new();
      if (!engine)
      {
        LOG(ERROR) << "Cannot create an OpenSSL engine for PKCS#11";
        throw OrthancException(ErrorCode_InternalError);
      }

      // Create a PKCS#11 context using libp11
      context_ = pkcs11_new();
      if (!context_)
      {
        LOG(ERROR) << "Cannot create a libp11 context for PKCS#11";
        ENGINE_free(engine);
        throw OrthancException(ErrorCode_InternalError);
      }

      if (!ENGINE_set_id(engine, PKCS11_ENGINE_ID) ||
          !ENGINE_set_name(engine, PKCS11_ENGINE_NAME) ||
          !ENGINE_set_cmd_defns(engine, PKCS11_ENGINE_COMMANDS) ||

          // Register the callback functions
          !ENGINE_set_init_function(engine, EngineInitialize) ||
          !ENGINE_set_finish_function(engine, EngineFinalize) ||
          !ENGINE_set_destroy_function(engine, EngineDestroy) ||
          !ENGINE_set_ctrl_function(engine, EngineControl) ||
          !ENGINE_set_load_pubkey_function(engine, EngineLoadPublicKey) ||
          !ENGINE_set_load_privkey_function(engine, EngineLoadPrivateKey) ||

          !ENGINE_set_RSA(engine, PKCS11_get_rsa_method()) ||
          !ENGINE_set_ECDSA(engine, PKCS11_get_ecdsa_method()) ||
          !ENGINE_set_ECDH(engine, PKCS11_get_ecdh_method()) ||

#if OPENSSL_VERSION_NUMBER  >= 0x10100002L
          !ENGINE_set_EC(engine, PKCS11_get_ec_key_method()) ||
#endif

          // Make OpenSSL know about our PKCS#11 engine
          !ENGINE_add(engine))
      {
        LOG(ERROR) << "Cannot initialize the OpenSSL engine for PKCS#11";
        pkcs11_finish(context_);
        ENGINE_free(engine);
        throw OrthancException(ErrorCode_InternalError);
      }

      // If the "ENGINE_add" worked, it gets a structural
      // reference. We release our just-created reference.
      ENGINE_free(engine);

      return ENGINE_by_id(PKCS11_ENGINE_ID);
    }
开发者ID:PACSinTERRA,项目名称:orthanc,代码行数:57,代码来源:Pkcs11.cpp


示例8: ENGINE_load_test

void ENGINE_load_test(void)
{
    fprintf(stderr, "arrive at ENGINE_load_test\n");
	/* Copied from eng_[openssl|dyn].c */
	ENGINE *toadd = engine_hwdev();
	if(!toadd) return;
	ENGINE_add(toadd);
	ENGINE_free(toadd);
	ERR_clear_error();
}
开发者ID:winstard,项目名称:GmSSL,代码行数:10,代码来源:cba_ecdh_engine.c


示例9: ENGINE_load_padlock

void ENGINE_load_padlock (void)
{
/* On non-x86 CPUs it just returns. */
#ifdef COMPILE_HW_PADLOCK
	ENGINE *toadd = ENGINE_padlock ();
	if (!toadd) return;
	ENGINE_add (toadd);
	ENGINE_free (toadd);
	ERR_clear_error ();
#endif
}
开发者ID:dframework,项目名称:cpp-common,代码行数:11,代码来源:eng_padlock.c


示例10: ENGINE_load_ibmca

static
#endif
void ENGINE_load_ibmca(void)
	{
	/* Copied from eng_[openssl|dyn].c */
	ENGINE *toadd = engine_ibmca();
	if(!toadd) return;
	ENGINE_add(toadd);
	ENGINE_free(toadd);
	ERR_clear_error();
	}
开发者ID:LucidOne,项目名称:Rovio,代码行数:11,代码来源:hw_ibmca.c


示例11: ENGINE_load_gost

void ENGINE_load_gost(void)
	{
	ENGINE *toadd;
	if (pmeth_GostR3410_94)
		return;
	toadd = engine_gost();
	if (!toadd) return;
	ENGINE_add(toadd);
	ENGINE_free(toadd);
	ERR_clear_error();
	}
开发者ID:0culus,项目名称:openssl,代码行数:11,代码来源:gost_eng.c


示例12: ENGINE_load_cluster_labs

static
#endif
void ENGINE_load_cluster_labs(void)
	{

	ENGINE *cluster_labs = engine_cluster_labs();
	
	if(!cluster_labs) return;
	ENGINE_add(cluster_labs);
	ENGINE_free(cluster_labs);
	ERR_clear_error();
	}
开发者ID:LucidOne,项目名称:Rovio,代码行数:12,代码来源:hw_cluster_labs.c


示例13: ENGINE_load_aesni

void ENGINE_load_aesni (void)
{
/* On non-x86 CPUs it just returns. */
#ifdef COMPILE_HW_AESNI
	ENGINE *toadd = ENGINE_aesni();
	if (!toadd)
		return;
	ENGINE_add (toadd);
	ENGINE_free (toadd);
	ERR_clear_error ();
#endif
}
开发者ID:evenmatrix,项目名称:streamster2-pyopenssl,代码行数:12,代码来源:eng_aesni.c


示例14: ENGINE_load_rdrand

void ENGINE_load_rdrand (void)
	{
	extern unsigned int OPENSSL_ia32cap_P[];

	if (OPENSSL_ia32cap_P[1] & (1<<(62-32)))
		{
		ENGINE *toadd = ENGINE_rdrand();
		if(!toadd) return;
		ENGINE_add(toadd);
		ENGINE_free(toadd);
		ERR_clear_error();
		}
	}
开发者ID:benwh4,项目名称:libressl,代码行数:13,代码来源:eng_rdrand.c


示例15: ENGINE_load_dynamic

void ENGINE_load_dynamic(void)
	{
	ENGINE *toadd = engine_dynamic();
	if(!toadd) return;
	ENGINE_add(toadd);
	/* If the "add" worked, it gets a structural reference. So either way,
	 * we release our just-created reference. */
	ENGINE_free(toadd);
	/* If the "add" didn't work, it was probably a conflict because it was
	 * already added (eg. someone calling ENGINE_load_blah then calling
	 * ENGINE_load_builtin_engines() perhaps). */
	ERR_clear_error();
	}
开发者ID:Cpasjuste,项目名称:platform_external_openssl,代码行数:13,代码来源:eng_dyn.c


示例16: ENGINE_load_HCSP

void ENGINE_load_HCSP(void)
{
   ENGINE* toadd = engine_HCSP(); /* Copied from eng_[openssl|dyn].c */

   if (!toadd) return;

   ENGINE_add(toadd);

   ENGINE_free(toadd);

#ifndef OPENSSL_NO_ERR
   ERR_clear_error();
#endif
}
开发者ID:alepharchives,项目名称:ULib,代码行数:14,代码来源:HCSP.c


示例17: engine_load_afalg_int

void engine_load_afalg_int(void)
{
    ENGINE *toadd;

    if (!afalg_chk_platform())
        return;

    toadd = engine_afalg();
    if (toadd == NULL)
        return;
    ENGINE_add(toadd);
    ENGINE_free(toadd);
    ERR_clear_error();
}
开发者ID:AlexanderPankiv,项目名称:node,代码行数:14,代码来源:e_afalg.c


示例18: EVP_CIPHER_CTX_copy

/*
 * this function does not exist in OpenSSL yet... or ever?.
 * a future version may break this function.
 * tested on 0.9.7d.
 */
int
EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in)
{
    memcpy(out, in, sizeof(EVP_CIPHER_CTX));

#if defined(HAVE_ENGINE_ADD) && defined(HAVE_ST_ENGINE)
    if (in->engine) ENGINE_add(out->engine);
    if (in->cipher_data) {
	out->cipher_data = OPENSSL_malloc(in->cipher->ctx_size);
	memcpy(out->cipher_data, in->cipher_data, in->cipher->ctx_size);
    }
#endif

    return 1;
}
开发者ID:4nkh,项目名称:rhodes,代码行数:20,代码来源:openssl_missing.c


示例19: ENGINE_load_t4

/*
 * This makes the engine "built-in" with OpenSSL.
 * On non-T4 CPUs this just returns.
 * Called by ENGINE_load_builtin_engines().
 */
void
ENGINE_load_t4(void)
{
#ifdef	COMPILE_HW_T4
	ENGINE *toadd = ENGINE_new();
	if (toadd != NULL) {
		if (t4_bind_helper(toadd, ENGINE_T4_ID) != 0) {
			(void) ENGINE_add(toadd);
			(void) ENGINE_free(toadd);
			ERR_clear_error();
		} else {
			(void) ENGINE_free(toadd);
		}
	}
#endif
}
开发者ID:Nebraska,项目名称:userland-gate,代码行数:21,代码来源:eng_t4.c


示例20: engine_load_devcrypto_int

/*
 * In case this engine is built into libcrypto, then it doesn't offer any
 * ability to be dynamically loadable.
 */
void engine_load_devcrypto_int(void)
{
    ENGINE *e = NULL;

    if (!open_devcrypto())
        return;

    if ((e = ENGINE_new()) == NULL
        || !bind_devcrypto(e)) {
        close_devcrypto();
        ENGINE_free(e);
        return;
    }

    ENGINE_add(e);
    ENGINE_free(e);          /* Loose our local reference */
    ERR_clear_error();
}
开发者ID:ciz,项目名称:openssl,代码行数:22,代码来源:e_devcrypto.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ENGINE_by_id函数代码示例发布时间:2022-05-30
下一篇:
C++ ENFORCE_STACK_ALIGN_1D函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap