Home
last modified time | relevance | path

Searched full:macctx (Results 1 – 10 of 10) sorted by relevance

/freebsd/crypto/openssl/providers/implementations/macs/
H A Dhmac_prov.c78 struct hmac_data_st *macctx; in hmac_new() local
83 if ((macctx = OPENSSL_zalloc(sizeof(*macctx))) == NULL in hmac_new()
84 || (macctx->ctx = HMAC_CTX_new()) == NULL) { in hmac_new()
85 OPENSSL_free(macctx); in hmac_new()
88 macctx->provctx = provctx; in hmac_new()
89 OSSL_FIPS_IND_INIT(macctx) in hmac_new()
91 return macctx; in hmac_new()
96 struct hmac_data_st *macctx = vmacctx; in hmac_free() local
98 if (macctx != NULL) { in hmac_free()
99 HMAC_CTX_free(macctx->ctx); in hmac_free()
[all …]
H A Dcmac_prov.c58 struct cmac_data_st *macctx; in cmac_new() local
63 if ((macctx = OPENSSL_zalloc(sizeof(*macctx))) == NULL in cmac_new()
64 || (macctx->ctx = CMAC_CTX_new()) == NULL) { in cmac_new()
65 OPENSSL_free(macctx); in cmac_new()
66 macctx = NULL; in cmac_new()
68 macctx->provctx = provctx; in cmac_new()
69 OSSL_FIPS_IND_INIT(macctx) in cmac_new()
72 return macctx; in cmac_new()
77 struct cmac_data_st *macctx = vmacctx; in cmac_free() local
79 if (macctx != NULL) { in cmac_free()
[all …]
H A Dblake2_mac_impl.c44 struct blake2_mac_data_st *macctx; in blake2_mac_new() local
49 macctx = OPENSSL_zalloc(sizeof(*macctx)); in blake2_mac_new()
50 if (macctx != NULL) { in blake2_mac_new()
51 BLAKE2_PARAM_INIT(&macctx->params); in blake2_mac_new()
54 return macctx; in blake2_mac_new()
75 struct blake2_mac_data_st *macctx = vmacctx; in blake2_mac_free() local
77 if (macctx != NULL) { in blake2_mac_free()
78 OPENSSL_cleanse(macctx->key, sizeof(macctx->key)); in blake2_mac_free()
79 OPENSSL_free(macctx); in blake2_mac_free()
85 struct blake2_mac_data_st *macctx = vmacctx; in blake2_mac_size() local
[all …]
H A Dgmac_prov.c49 struct gmac_data_st *macctx = vmacctx; in gmac_free() local
51 if (macctx != NULL) { in gmac_free()
52 EVP_CIPHER_CTX_free(macctx->ctx); in gmac_free()
53 ossl_prov_cipher_reset(&macctx->cipher); in gmac_free()
54 OPENSSL_free(macctx); in gmac_free()
60 struct gmac_data_st *macctx; in gmac_new() local
65 if ((macctx = OPENSSL_zalloc(sizeof(*macctx))) == NULL in gmac_new()
66 || (macctx->ctx = EVP_CIPHER_CTX_new()) == NULL) { in gmac_new()
67 gmac_free(macctx); in gmac_new()
70 macctx->provctx = provctx; in gmac_new()
[all …]
H A Dkmac_prov.c687 struct kmac_data_st *macctx = kmac##size##_new(provctx); \
689 if (macctx != NULL) \
690 macctx->internal = 1; \
691 return macctx; \
/freebsd/crypto/openssl/providers/implementations/signature/
H A Dmac_legacy_sig.c47 EVP_MAC_CTX *macctx; member
70 pmacctx->macctx = EVP_MAC_CTX_new(mac); in mac_newctx()
71 if (pmacctx->macctx == NULL) in mac_newctx()
125 if (!ossl_prov_set_macctx(pmacctx->macctx, NULL, in mac_digest_sign_init()
133 if (!EVP_MAC_init(pmacctx->macctx, pmacctx->key->priv_key, in mac_digest_sign_init()
145 if (pmacctx == NULL || pmacctx->macctx == NULL) in mac_digest_sign_update()
148 return EVP_MAC_update(pmacctx->macctx, data, datalen); in mac_digest_sign_update()
156 if (!ossl_prov_is_running() || pmacctx == NULL || pmacctx->macctx == NULL) in mac_digest_sign_final()
159 return EVP_MAC_final(pmacctx->macctx, mac, maclen, macsize); in mac_digest_sign_final()
167 EVP_MAC_CTX_free(ctx->macctx); in mac_freectx()
[all …]
/freebsd/crypto/openssl/providers/common/
H A Dprovider_util.c230 int ossl_prov_set_macctx(EVP_MAC_CTX *macctx, in ossl_prov_set_macctx() argument
292 return EVP_MAC_CTX_set_params(macctx, mac_params); in ossl_prov_set_macctx()
296 int ossl_prov_macctx_load_from_params(EVP_MAC_CTX **macctx, in ossl_prov_macctx_load_from_params() argument
323 EVP_MAC_CTX_free(*macctx); in ossl_prov_macctx_load_from_params()
324 *macctx = mac == NULL ? NULL : EVP_MAC_CTX_new(mac); in ossl_prov_macctx_load_from_params()
327 if (*macctx == NULL) in ossl_prov_macctx_load_from_params()
335 if (*macctx == NULL) in ossl_prov_macctx_load_from_params()
338 if (ossl_prov_set_macctx(*macctx, params, ciphername, mdname, NULL, in ossl_prov_macctx_load_from_params()
342 EVP_MAC_CTX_free(*macctx); in ossl_prov_macctx_load_from_params()
343 *macctx = NULL; in ossl_prov_macctx_load_from_params()
/freebsd/crypto/openssl/providers/implementations/kdfs/
H A Dsskdf.c58 EVP_MAC_CTX *macctx; /* H(x) = HMAC_hash OR H(x) = KMAC */ member
328 EVP_MAC_CTX_free(ctx->macctx); in sskdf_reset()
354 if (src->macctx != NULL) { in sskdf_dup()
355 dest->macctx = EVP_MAC_CTX_dup(src->macctx); in sskdf_dup()
356 if (dest->macctx == NULL) in sskdf_dup()
428 if (ctx->macctx != NULL) { in sskdf_derive()
434 EVP_MAC *mac = EVP_MAC_CTX_get0_mac(ctx->macctx); in sskdf_derive()
464 ret = SSKDF_mac_kdm(ctx->macctx, in sskdf_derive()
536 if (ctx->macctx != NULL) { in x963kdf_derive()
563 if (!ossl_prov_macctx_load_from_params(&ctx->macctx, params, in sskdf_common_set_ctx_params()
[all …]
/freebsd/crypto/openssl/providers/common/include/prov/
H A Dprovider_util.h97 int ossl_prov_set_macctx(EVP_MAC_CTX *macctx,
123 int ossl_prov_macctx_load_from_params(EVP_MAC_CTX **macctx,
/freebsd/crypto/openssl/providers/implementations/rands/
H A Ddrbg_hmac.c415 EVP_MAC_CTX **macctx, in drbg_fetch_algs_from_prov() argument
424 if (macctx == NULL || digest == NULL) in drbg_fetch_algs_from_prov()
458 EVP_MAC_CTX_free(*macctx); in drbg_fetch_algs_from_prov()
459 *macctx = NULL; in drbg_fetch_algs_from_prov()
463 *macctx = EVP_MAC_CTX_new(mac); in drbg_fetch_algs_from_prov()