Lines Matching refs:hctx
451 OSSL_HMAC_PKEY_CTX *hctx; in ossl_hmac_init() local
453 if ((hctx = OPENSSL_zalloc(sizeof(*hctx))) == NULL) in ossl_hmac_init()
455 hctx->ktmp.type = V_ASN1_OCTET_STRING; in ossl_hmac_init()
456 hctx->ctx = HMAC_CTX_new(); in ossl_hmac_init()
457 if (hctx->ctx == NULL) { in ossl_hmac_init()
458 OPENSSL_free(hctx); in ossl_hmac_init()
461 EVP_PKEY_CTX_set_data(ctx, hctx); in ossl_hmac_init()
497 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_cleanup() local
499 if (hctx) { in ossl_hmac_cleanup()
500 HMAC_CTX_free(hctx->ctx); in ossl_hmac_cleanup()
501 OPENSSL_clear_free(hctx->ktmp.data, hctx->ktmp.length); in ossl_hmac_cleanup()
502 OPENSSL_free(hctx); in ossl_hmac_cleanup()
510 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_keygen() local
511 if (!hctx->ktmp.data) in ossl_hmac_keygen()
513 hkey = ASN1_OCTET_STRING_dup(&hctx->ktmp); in ossl_hmac_keygen()
523 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(EVP_MD_CTX_get_pkey_ctx(ctx)); in ossl_int_update() local
524 if (!HMAC_Update(hctx->ctx, data, count)) in ossl_int_update()
540 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_signctx() local
549 if (!HMAC_Final(hctx->ctx, sig, &hlen)) in ossl_hmac_signctx()
557 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_ctrl() local
565 if (!ASN1_OCTET_STRING_set(&hctx->ktmp, p2, p1)) in ossl_hmac_ctrl()
570 hctx->md = p2; in ossl_hmac_ctrl()
576 if (!HMAC_Init_ex(hctx->ctx, key->data, key->length, hctx->md, NULL)) in ossl_hmac_ctrl()