Home
last modified time | relevance | path

Searched refs:algctx (Results 1 – 21 of 21) sorted by relevance

/freebsd/crypto/openssl/crypto/evp/
H A Dkdf_lib.c32 || (ctx->algctx = kdf->newctx(ossl_provider_ctx(kdf->prov))) == NULL in EVP_KDF_CTX_new()
36 kdf->freectx(ctx->algctx); in EVP_KDF_CTX_new()
49 ctx->meth->freectx(ctx->algctx); in EVP_KDF_CTX_free()
50 ctx->algctx = NULL; in EVP_KDF_CTX_free()
59 if (src == NULL || src->algctx == NULL || src->meth->dupctx == NULL) in EVP_KDF_CTX_dup()
73 dst->algctx = src->meth->dupctx(src->algctx); in EVP_KDF_CTX_dup()
74 if (dst->algctx == NULL) { in EVP_KDF_CTX_dup()
117 ctx->meth->reset(ctx->algctx); in EVP_KDF_CTX_reset()
130 && ctx->meth->get_ctx_params(ctx->algctx, params)) in EVP_KDF_CTX_get_kdf_size()
144 return ctx->meth->derive(ctx->algctx, key, keylen, params); in EVP_KDF_derive()
[all …]
H A Dmac_lib.c28 if ((ctx->algctx = mac->newctx(ossl_provider_ctx(mac->prov))) == NULL in EVP_MAC_CTX_new()
30 mac->freectx(ctx->algctx); in EVP_MAC_CTX_new()
43 ctx->meth->freectx(ctx->algctx); in EVP_MAC_CTX_free()
44 ctx->algctx = NULL; in EVP_MAC_CTX_free()
54 if (src->algctx == NULL) in EVP_MAC_CTX_dup()
68 dst->algctx = src->meth->dupctx(src->algctx); in EVP_MAC_CTX_dup()
69 if (dst->algctx == NULL) { in EVP_MAC_CTX_dup()
86 if (ctx->algctx != NULL) { in get_size_t_ctx_param()
91 if (ctx->meth->get_ctx_params(ctx->algctx, params)) in get_size_t_ctx_param()
122 return ctx->meth->init(ctx->algctx, key, keylen, params); in EVP_MAC_init()
[all …]
H A Ddigest.c46 if (ctx->algctx != NULL) { in evp_md_ctx_clear_digest()
48 ctx->digest->freectx(ctx->algctx); in evp_md_ctx_clear_digest()
49 ctx->algctx = NULL; in evp_md_ctx_clear_digest()
145 if (ctx->algctx != NULL) { in evp_md_ctx_free_algctx()
151 ctx->digest->freectx(ctx->algctx); in evp_md_ctx_free_algctx()
152 ctx->algctx = NULL; in evp_md_ctx_free_algctx()
167 && ctx->pctx->op.sig.algctx != NULL) { in evp_md_init_internal()
289 if (ctx->algctx == NULL) { in evp_md_init_internal()
290 ctx->algctx = ctx->digest->newctx(ossl_provider_ctx(type->prov)); in evp_md_init_internal()
291 if (ctx->algctx == NULL) { in evp_md_init_internal()
[all …]
H A Dpmeth_lib.c144 && ctx->op.kex.algctx != NULL) in evp_pkey_ctx_state()
146 && ctx->op.sig.algctx != NULL) in evp_pkey_ctx_state()
148 && ctx->op.ciph.algctx != NULL) in evp_pkey_ctx_state()
152 && ctx->op.encap.algctx != NULL)) in evp_pkey_ctx_state()
361 if (ctx->op.sig.algctx != NULL && ctx->op.sig.signature != NULL) in evp_pkey_ctx_free_old_ops()
362 ctx->op.sig.signature->freectx(ctx->op.sig.algctx); in evp_pkey_ctx_free_old_ops()
364 ctx->op.sig.algctx = NULL; in evp_pkey_ctx_free_old_ops()
367 if (ctx->op.kex.algctx != NULL && ctx->op.kex.exchange != NULL) in evp_pkey_ctx_free_old_ops()
368 ctx->op.kex.exchange->freectx(ctx->op.kex.algctx); in evp_pkey_ctx_free_old_ops()
370 ctx->op.kex.algctx = NULL; in evp_pkey_ctx_free_old_ops()
[all …]
H A Devp_rand.c97 return rand->meth->enable_locking(rand->algctx); in EVP_RAND_enable_locking()
106 return rand->meth->lock(rand->algctx); in evp_rand_lock()
114 rand->meth->unlock(rand->algctx); in evp_rand_unlock()
364 parent_ctx = parent->algctx; in EVP_RAND_CTX_new()
367 if ((ctx->algctx = rand->newctx(ossl_provider_ctx(rand->prov), parent_ctx, in EVP_RAND_CTX_new()
372 rand->freectx(ctx->algctx); in EVP_RAND_CTX_new()
395 ctx->meth->freectx(ctx->algctx); in EVP_RAND_CTX_free()
396 ctx->algctx = NULL; in EVP_RAND_CTX_free()
411 return ctx->meth->get_ctx_params(ctx->algctx, params); in evp_rand_get_ctx_params_locked()
429 return ctx->meth->set_ctx_params(ctx->algctx, params); in evp_rand_set_ctx_params_locked()
[all …]
H A Devp_enc.c41 if (ctx->algctx != NULL) { in OSSL_SAFE_MATH_SIGNED()
43 ctx->cipher->freectx(ctx->algctx); in OSSL_SAFE_MATH_SIGNED()
44 ctx->algctx = NULL; in OSSL_SAFE_MATH_SIGNED()
227 if (ctx->algctx == NULL) { in evp_cipher_init_internal()
228 ctx->algctx = ctx->cipher->newctx(ossl_provider_ctx(cipher->prov)); in evp_cipher_init_internal()
229 if (ctx->algctx == NULL) { in evp_cipher_init_internal()
290 return ctx->cipher->einit_skey(ctx->algctx, NULL, in evp_cipher_init_internal()
300 return ctx->cipher->einit(ctx->algctx, in evp_cipher_init_internal()
316 return ctx->cipher->dinit_skey(ctx->algctx, NULL, in evp_cipher_init_internal()
326 return ctx->cipher->dinit(ctx->algctx, in evp_cipher_init_internal()
[all …]
H A Dm_sigver.c79 || locpctx->op.sig.algctx == NULL)) in do_sigver_init()
198 locpctx->op.sig.algctx in do_sigver_init()
200 if (locpctx->op.sig.algctx == NULL) { in do_sigver_init()
262 ret = signature->digest_verify_init(locpctx->op.sig.algctx, in do_sigver_init()
270 ret = signature->digest_sign_init(locpctx->op.sig.algctx, in do_sigver_init()
417 || pctx->op.sig.algctx == NULL in EVP_DigestSignUpdate()
430 ret = signature->digest_sign_update(pctx->op.sig.algctx, data, dsize); in EVP_DigestSignUpdate()
463 || pctx->op.sig.algctx == NULL in EVP_DigestVerifyUpdate()
476 ret = signature->digest_verify_update(pctx->op.sig.algctx, data, dsize); in EVP_DigestVerifyUpdate()
511 || pctx->op.sig.algctx == NULL in EVP_DigestSignFinal()
[all …]
H A Dkem.c162 ctx->op.encap.algctx = kem->newctx(ossl_provider_ctx(kem->prov)); in evp_kem_init()
163 if (ctx->op.encap.algctx == NULL) { in evp_kem_init()
172 ret = kem->auth_encapsulate_init(ctx->op.encap.algctx, provkey, in evp_kem_init()
175 ret = kem->encapsulate_init(ctx->op.encap.algctx, provkey, params); in evp_kem_init()
184 ret = kem->auth_decapsulate_init(ctx->op.encap.algctx, provkey, in evp_kem_init()
187 ret = kem->decapsulate_init(ctx->op.encap.algctx, provkey, params); in evp_kem_init()
238 if (ctx->op.encap.algctx == NULL) { in EVP_PKEY_encapsulate()
246 return ctx->op.encap.kem->encapsulate(ctx->op.encap.algctx, in EVP_PKEY_encapsulate()
277 if (ctx->op.encap.algctx == NULL) { in EVP_PKEY_decapsulate()
281 return ctx->op.encap.kem->decapsulate(ctx->op.encap.algctx, in EVP_PKEY_decapsulate()
H A Dsignature.c783 ctx->op.sig.algctx = signature->newctx(ossl_provider_ctx(signature->prov), ctx->propquery); in evp_pkey_signature_init()
784 if (ctx->op.sig.algctx == NULL) { in evp_pkey_signature_init()
798 ret = signature->sign_init(ctx->op.sig.algctx, provkey, params); in evp_pkey_signature_init()
807 ret = signature->sign_message_init(ctx->op.sig.algctx, provkey, params); in evp_pkey_signature_init()
816 ret = signature->verify_init(ctx->op.sig.algctx, provkey, params); in evp_pkey_signature_init()
825 ret = signature->verify_message_init(ctx->op.sig.algctx, provkey, params); in evp_pkey_signature_init()
834 ret = signature->verify_recover_init(ctx->op.sig.algctx, provkey, params); in evp_pkey_signature_init()
842 signature->freectx(ctx->op.sig.algctx); in evp_pkey_signature_init()
843 ctx->op.sig.algctx = NULL; in evp_pkey_signature_init()
950 ret = signature->sign_message_update(ctx->op.sig.algctx, in, inlen); in EVP_PKEY_sign_message_update()
[all …]
H A Dasymcipher.c157 ctx->op.ciph.algctx = cipher->newctx(ossl_provider_ctx(cipher->prov)); in evp_pkey_asym_cipher_init()
158 if (ctx->op.ciph.algctx == NULL) { in evp_pkey_asym_cipher_init()
173 ret = cipher->encrypt_init(ctx->op.ciph.algctx, provkey, params); in evp_pkey_asym_cipher_init()
182 ret = cipher->decrypt_init(ctx->op.ciph.algctx, provkey, params); in evp_pkey_asym_cipher_init()
260 if (ctx->op.ciph.algctx == NULL) in EVP_PKEY_encrypt()
266 ret = cipher->encrypt(ctx->op.ciph.algctx, out, outlen, (out == NULL ? 0 : *outlen), in, inlen); in EVP_PKEY_encrypt()
309 if (ctx->op.ciph.algctx == NULL) in EVP_PKEY_decrypt()
315 ret = cipher->decrypt(ctx->op.ciph.algctx, out, outlen, (out == NULL ? 0 : *outlen), in, inlen); in EVP_PKEY_decrypt()
H A Dexchange.c344 ctx->op.kex.algctx = exchange->newctx(ossl_provider_ctx(exchange->prov)); in EVP_PKEY_derive_init_ex()
345 if (ctx->op.kex.algctx == NULL) { in EVP_PKEY_derive_init_ex()
350 ret = exchange->init(ctx->op.kex.algctx, provkey, params); in EVP_PKEY_derive_init_ex()
398 if (!EVP_PKEY_CTX_IS_DERIVE_OP(ctx) || ctx->op.kex.algctx == NULL) in EVP_PKEY_derive_set_peer_ex()
442 ret = ctx->op.kex.exchange->set_peer(ctx->op.kex.algctx, provkey); in EVP_PKEY_derive_set_peer_ex()
530 if (ctx->op.kex.algctx == NULL) in EVP_PKEY_derive()
533 ret = ctx->op.kex.exchange->derive(ctx->op.kex.algctx, key, pkeylen, in EVP_PKEY_derive()
H A Devp_local.h31 void *algctx; member
60 void *algctx; member
70 void *algctx; member
79 void *algctx; member
88 void *algctx; member
H A Devp_lib.c403 ret = ctx->cipher->ccipher(ctx->algctx, out, &outl, in EVP_Cipher()
409 ret = ctx->cipher->cupdate(ctx->algctx, out, &outl, in EVP_Cipher()
413 ret = ctx->cipher->cfinal(ctx->algctx, out, &outl, in EVP_Cipher()
503 rv = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params); in EVP_CIPHER_CTX_get_iv_length()
537 ret = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params); in EVP_CIPHER_CTX_get_tag_length()
550 ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params); in EVP_CIPHER_CTX_original_iv()
566 ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params); in EVP_CIPHER_CTX_iv()
579 ok = evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params); in EVP_CIPHER_CTX_iv_noconst()
590 return evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params) > 0; in EVP_CIPHER_CTX_get_updated_iv()
598 return evp_do_ciph_ctx_getparams(ctx->cipher, ctx->algctx, params) > 0; in EVP_CIPHER_CTX_get_original_iv()
[all …]
H A Devp_utils.c45 int name(const type *obj, void *algctx, OSSL_PARAM params[]) \
48 return obj->func(algctx, params); \
H A Dkdf_meth.c211 return ctx->meth->gettable_ctx_params(ctx->algctx, alg); in EVP_KDF_CTX_gettable_params()
221 return ctx->meth->settable_ctx_params(ctx->algctx, alg); in EVP_KDF_CTX_settable_params()
H A Dmac_meth.c232 return ctx->meth->gettable_ctx_params(ctx->algctx, alg); in EVP_MAC_CTX_gettable_params()
242 return ctx->meth->settable_ctx_params(ctx->algctx, alg); in EVP_MAC_CTX_settable_params()
H A Dctrl_params_translate.c431 && ctx->pctx->op.sig.algctx == NULL) in default_fixup_args()
433 && ctx->pctx->op.kex.algctx == NULL) in default_fixup_args()
435 && ctx->pctx->op.ciph.algctx == NULL) in default_fixup_args()
437 && ctx->pctx->op.encap.algctx == NULL) in default_fixup_args()
/freebsd/crypto/openssl/test/testutil/
H A Dfake_random.c182 f = rng->algctx; in check_rng()
219 ((FAKE_RAND *)rng->algctx)->cb = cb; in fake_rand_set_callback()
/freebsd/crypto/openssl/include/crypto/
H A Devp.h65 void *algctx; member
74 void *algctx; member
83 void *algctx; member
91 void *algctx; member
/freebsd/crypto/openssl/test/
H A Devp_extra_test2.c1597 origin_algctx = outctx->algctx; in test_evp_md_ctx_copy2()
1599 && TEST_true(outctx->algctx == origin_algctx); in test_evp_md_ctx_copy2()
H A Ddrbgtest.c100 return (PROV_DRBG *)drbg->algctx; in DRBG_UINT()