X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_eng.c;h=ad6d62b6b6d8280c29e3fc0525c5713d21566656;hb=7ce996d12c96ffb936ec22f0a8b826c64516699f;hp=1cac94430e344e0cdcd604740ee29d89449a3e66;hpb=a54af1d8031c66f55967fa9faf70b9c5ea96d9b8;p=openssl-gost%2Fengine.git diff --git a/gost_eng.c b/gost_eng.c index 1cac944..ad6d62b 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -29,7 +29,7 @@ static int gost_ciphers(ENGINE* e, const EVP_CIPHER** cipher, const int** nids, int nid); static int gost_digests(ENGINE* e, const EVP_MD** digest, - const int** nids, int ind); + const int** nids, int nid); static int gost_pkey_meths(ENGINE* e, EVP_PKEY_METHOD** pmeth, const int** nids, int nid); @@ -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();