]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_eng.c
gost_crypt: process full available block in CFB and CNT mode
[openssl-gost/engine.git] / gost_eng.c
index 472ba82573f0964a593374f8fb5eeb44a5b07eab..a1dcd790604c9ffe68c2d66bb8c61235eae234dd 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();
@@ -110,6 +112,7 @@ static int gost_engine_destroy(ENGINE* e) {
     imit_gost_cp_12_destroy();
 
     cipher_gost_destroy();
+    cipher_gost_grasshopper_destroy();
 
     gost_param_free();
 
@@ -125,6 +128,8 @@ static int gost_engine_destroy(ENGINE* e) {
     ameth_GostR3410_2012_512 = NULL;
     ameth_Gost28147_MAC_12 = NULL;
 
+       ERR_unload_GOST_strings();
+       
     return 1;
 }
 
@@ -231,6 +236,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();