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()
457 hctx->ktmp.type = V_ASN1_OCTET_STRING; in ossl_hmac_init()
458 hctx->ctx = HMAC_CTX_new(); in ossl_hmac_init()
459 if (hctx->ctx == NULL) { in ossl_hmac_init()
460 OPENSSL_free(hctx); in ossl_hmac_init()
463 EVP_PKEY_CTX_set_data(ctx, hctx); in ossl_hmac_init()
499 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_cleanup() local
501 if (hctx) { in ossl_hmac_cleanup()
502 HMAC_CTX_free(hctx->ctx); in ossl_hmac_cleanup()
503 OPENSSL_clear_free(hctx->ktmp.data, hctx->ktmp.length); in ossl_hmac_cleanup()
504 OPENSSL_free(hctx); in ossl_hmac_cleanup()
512 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_keygen() local
513 if (!hctx->ktmp.data) in ossl_hmac_keygen()
515 hkey = ASN1_OCTET_STRING_dup(&hctx->ktmp); in ossl_hmac_keygen()
525 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(EVP_MD_CTX_get_pkey_ctx(ctx)); in ossl_int_update() local
526 if (!HMAC_Update(hctx->ctx, data, count)) in ossl_int_update()
542 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_signctx() local
551 if (!HMAC_Final(hctx->ctx, sig, &hlen)) in ossl_hmac_signctx()
559 OSSL_HMAC_PKEY_CTX *hctx = EVP_PKEY_CTX_get_data(ctx); in ossl_hmac_ctrl() local
567 if (!ASN1_OCTET_STRING_set(&hctx->ktmp, p2, p1)) in ossl_hmac_ctrl()
572 hctx->md = p2; in ossl_hmac_ctrl()
578 if (!HMAC_Init_ex(hctx->ctx, key->data, key->length, hctx->md, NULL)) in ossl_hmac_ctrl()