]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
GOST md aliases
authorDmitry Belyavskiy <beldmit@gmail.com>
Sun, 18 Nov 2018 12:06:43 +0000 (15:06 +0300)
committerDmitry Belyavskiy <beldmit@gmail.com>
Sun, 25 Nov 2018 08:19:22 +0000 (11:19 +0300)
gost_eng.c

index 16316a16949db7de9b6c4acf7bb4bc2566821cb4..9e77e5dc6a605bcc87bab2c9acfc46c47a31994e 100644 (file)
@@ -102,6 +102,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();
@@ -233,6 +235,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();