From d75b9161539dc02901807a6496fe948fa6985fe9 Mon Sep 17 00:00:00 2001 From: orignal Date: Sat, 18 Feb 2017 18:45:21 -0500 Subject: [PATCH] correct GOST engine initialization --- Crypto.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Crypto.cpp b/Crypto.cpp index dd6a7811..fb3ce16b 100644 --- a/Crypto.cpp +++ b/Crypto.cpp @@ -831,6 +831,9 @@ namespace crypto g_GostEngine = ENGINE_by_id ("gost"); if (!g_GostEngine) return false; + ENGINE_init (g_GostEngine); + ENGINE_set_default (g_GostEngine, ENGINE_METHOD_ALL); + ENGINE_ctrl_cmd_string(g_GostEngine, "CRYPT_PARAMS", "id-Gost28147-89-CryptoPro-A-ParamSet", 0); g_Gost3411 = ENGINE_get_digest(g_GostEngine, NID_id_GostR3411_94); return true; }