EVP_MD_meth_free(md);
md = NULL;
}
+ if (md && d->alias)
+ EVP_add_digest_alias(EVP_MD_name(md), d->alias);
d->digest = md;
return md;
}
void GOST_deinit_digest(GOST_digest *d)
{
+ if (d->alias)
+ EVP_delete_digest_alias(d->alias);
EVP_MD_meth_free(d->digest);
d->digest = NULL;
}
GOST_digest GostR3411_2012_256_digest = {
.nid = NID_id_GostR3411_2012_256,
+ .alias = "streebog256",
.template = &GostR3411_2012_template_digest,
.result_size = 32,
.init = gost_digest_init256,
GOST_digest GostR3411_2012_512_digest = {
.nid = NID_id_GostR3411_2012_512,
+ .alias = "streebog512",
.template = &GostR3411_2012_template_digest,
.result_size = 64,
.init = gost_digest_init512,