- if (_hidden_Gost28147_89_12_MAC_md == NULL) {
- EVP_MD *md;
-
- if ((md = EVP_MD_meth_new(NID_gost_mac_12, NID_undef)) == NULL
- || !EVP_MD_meth_set_result_size(md, 4)
- || !EVP_MD_meth_set_input_blocksize(md, 8)
- || !EVP_MD_meth_set_app_datasize(md,
- sizeof(struct ossl_gost_imit_ctx))
- || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_XOF)
- || !EVP_MD_meth_set_init(md, gost_imit_init_cp_12)
- || !EVP_MD_meth_set_update(md, gost_imit_update)
- || !EVP_MD_meth_set_final(md, gost_imit_final)
- || !EVP_MD_meth_set_copy(md, gost_imit_copy)
- || !EVP_MD_meth_set_cleanup(md, gost_imit_cleanup)
- || !EVP_MD_meth_set_ctrl(md, gost_imit_ctrl)) {
- EVP_MD_meth_free(md);
- md = NULL;
- }
- _hidden_Gost28147_89_12_MAC_md = md;
- }
- return _hidden_Gost28147_89_12_MAC_md;