當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。