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


C++ CRYPTO_set_ex_data函数代码示例

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


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

示例1: MYOBJ_sethello

static void MYOBJ_sethello(MYOBJ *obj, char *cp)
{
    int st;

    st = CRYPTO_set_ex_data(&obj->ex_data, sidx, cp);
    assert(st != 0);
}
开发者ID:1234-,项目名称:openssl,代码行数:7,代码来源:exdatatest.c

示例2: ECDSA_set_ex_data

int ECDSA_set_ex_data(EC_KEY *d, int idx, void *arg)
{
	ECDSA_DATA *ecdsa;
	ecdsa = ecdsa_check(d);
	if (ecdsa == NULL)
		return 0;
	return(CRYPTO_set_ex_data(&ecdsa->ex_data,idx,arg));
}
开发者ID:0omega,项目名称:platform_external_openssl,代码行数:8,代码来源:ecs_lib.c

示例3: ECDH_set_ex_data

int ECDH_set_ex_data(EC_KEY *d, int idx, void *arg)
{
    ECDH_DATA *ecdh;
    ecdh = ecdh_check(d);
    if (ecdh == NULL)
        return 0;
    return (CRYPTO_set_ex_data(&ecdh->ex_data, idx, arg));
}
开发者ID:aeijdenberg,项目名称:openssl,代码行数:8,代码来源:ech_lib.c

示例4: keyhandle_dup

/**
 * Duplicates a keyhandle stored in ex_data in case we copy a key.
 */
int keyhandle_dup(CRYPTO_EX_DATA* to, CRYPTO_EX_DATA*, void *ptrRef, int idx, long, void *) {
    // This appears to be a bug in OpenSSL.
    void** ptr = reinterpret_cast<void**>(ptrRef);
    char* keyhandle = reinterpret_cast<char*>(*ptr);
    if (keyhandle != NULL) {
        char* keyhandle_copy = strdup(keyhandle);
        *ptr = keyhandle_copy;

        // Call this in case OpenSSL is fixed in the future.
        (void) CRYPTO_set_ex_data(to, idx, keyhandle_copy);
    }
    return 1;
}
开发者ID:TeamNyx,项目名称:system_security,代码行数:16,代码来源:eng_keystore.cpp

示例5: zlib_stateful_init

static int zlib_stateful_init(COMP_CTX *ctx)
{
    int err;
    struct zlib_state *state =
        (struct zlib_state *)OPENSSL_malloc(sizeof(struct zlib_state));

    if (state == NULL)
        goto err;

    state->istream.zalloc = zlib_zalloc;
    state->istream.zfree = zlib_zfree;
    state->istream.opaque = Z_NULL;
    state->istream.next_in = Z_NULL;
    state->istream.next_out = Z_NULL;
    state->istream.avail_in = 0;
    state->istream.avail_out = 0;
    err = inflateInit_(&state->istream, ZLIB_VERSION, sizeof(z_stream));
    if (err != Z_OK)
        goto err;

    state->ostream.zalloc = zlib_zalloc;
    state->ostream.zfree = zlib_zfree;
    state->ostream.opaque = Z_NULL;
    state->ostream.next_in = Z_NULL;
    state->ostream.next_out = Z_NULL;
    state->ostream.avail_in = 0;
    state->ostream.avail_out = 0;
    err = deflateInit_(&state->ostream, Z_DEFAULT_COMPRESSION,
                       ZLIB_VERSION, sizeof(z_stream));
    if (err != Z_OK)
        goto err;

    CRYPTO_new_ex_data(CRYPTO_EX_INDEX_COMP, ctx, &ctx->ex_data);
    CRYPTO_set_ex_data(&ctx->ex_data, zlib_stateful_ex_idx, state);
    return 1;
 err:
    if (state)
        OPENSSL_free(state);
    return 0;
}
开发者ID:03050903,项目名称:godot,代码行数:40,代码来源:c_zlib.c

示例6: SSL_SESSION_set_ex_data

int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg)
{
    return (CRYPTO_set_ex_data(&s->ex_data, idx, arg));
}
开发者ID:infinityhacks,项目名称:openssl,代码行数:4,代码来源:ssl_sess.c

示例7: X509_set_ex_data

int X509_set_ex_data(X509 *r, int idx, void *arg)
	{
	return(CRYPTO_set_ex_data(&r->ex_data,idx,arg));
	}
开发者ID:gorlak,项目名称:panda3d-thirdparty,代码行数:4,代码来源:x_x509.c

示例8: UI_set_ex_data

int UI_set_ex_data(UI *r, int idx, void *arg)
{
    return (CRYPTO_set_ex_data(&r->ex_data, idx, arg));
}
开发者ID:danielctull-forks,项目名称:openssl,代码行数:4,代码来源:ui_lib.c

示例9: UI_method_set_ex_data

int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data)
{
    return CRYPTO_set_ex_data(&method->ex_data, idx, data);
}
开发者ID:danielctull-forks,项目名称:openssl,代码行数:4,代码来源:ui_lib.c

示例10: ENGINE_set_ex_data

int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg)
	{
	return(CRYPTO_set_ex_data(&e->ex_data, idx, arg));
	}
开发者ID:oss-forks,项目名称:openssl,代码行数:4,代码来源:eng_lib.c

示例11: STORE_set_ex_data

int
STORE_set_ex_data(STORE *r, int idx, void *arg)
{
	return (CRYPTO_set_ex_data(&r->ex_data, idx, arg));
}
开发者ID:randombit,项目名称:hacrypto,代码行数:5,代码来源:str_lib.c

示例12: DH_set_ex_data

int DH_set_ex_data(DH *d, int idx, void *arg) {
    return (CRYPTO_set_ex_data(&d->ex_data, idx, arg));
}
开发者ID:randombit,项目名称:hacrypto,代码行数:3,代码来源:dh.c

示例13: X509_STORE_set_ex_data

int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data)
{
    return CRYPTO_set_ex_data(&str->ex_data, idx, data);
}
开发者ID:4nkh,项目名称:rhodes,代码行数:4,代码来源:openssl_missing.c

示例14: SSL_SESSION_set_ex_data

int SSL_SESSION_set_ex_data(SSL_SESSION *session, int idx, void *arg) {
  return CRYPTO_set_ex_data(&session->ex_data, idx, arg);
}
开发者ID:Helmsen,项目名称:gRPC-to-GraphQL-Adapter,代码行数:3,代码来源:ssl_session.c

示例15: RAND_DRBG_set_ex_data

/*
 * Get and set the EXDATA
 */
int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *arg)
{
    return CRYPTO_set_ex_data(&drbg->ex_data, idx, arg);
}
开发者ID:cedral,项目名称:openssl,代码行数:7,代码来源:drbg_lib.c


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