From 0b50e0028fa9d2cfb9648f8f3209e89d75e311c1 Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Sun, 18 Nov 2018 15:06:43 +0300 Subject: [PATCH] GOST md aliases --- gost_eng.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gost_eng.c b/gost_eng.c index 1cac944..69f9975 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -122,6 +122,8 @@ static int gost_engine_finish(ENGINE* e) { } static int gost_engine_destroy(ENGINE* e) { + EVP_delete_digest_alias("streebog256"); + EVP_delete_digest_alias("streebog512"); digest_gost_destroy(); digest_gost2012_256_destroy(); digest_gost2012_512_destroy(); @@ -293,6 +295,11 @@ static int bind_gost(ENGINE* e, const char* id) { goto end; } + if(!EVP_add_digest_alias(SN_id_GostR3411_2012_256, "streebog256") + || !EVP_add_digest_alias(SN_id_GostR3411_2012_512, "streebog512")) { + goto end; + } + ENGINE_register_all_complete(); ERR_load_GOST_strings(); -- 2.39.5