X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_eng.c;h=1565d64d83c7ab2cd8dfe65773eaf8031f22444c;hb=41bff5cad003c9239623e556e69a281b2a8e80b1;hp=74fe13e205209c984c5d6e146875d67cec425256;hpb=1716316de77a041bd25bf6d0c87bd4a3b5d12010;p=openssl-gost%2Fengine.git diff --git a/gost_eng.c b/gost_eng.c index 74fe13e..1565d64 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -50,6 +50,7 @@ static int gost_cipher_nids[] = { NID_magma_cbc, NID_magma_ctr, NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm, + NID_kuznyechik_mgm, 0 }; @@ -164,7 +165,7 @@ static int gost_engine_destroy(ENGINE* e) { return 1; } -int bind_gost(ENGINE* e, const char* id) { +static int bind_gost(ENGINE* e, const char* id) { int ret = 0; if (id != NULL && strcmp(id, engine_gost_id) != 0) return 0; @@ -280,6 +281,9 @@ int bind_gost(ENGINE* e, const char* id) { || !EVP_add_cipher(cipher_gost_grasshopper_ofb()) || !EVP_add_cipher(cipher_gost_grasshopper_ctr()) || !EVP_add_cipher(cipher_gost_grasshopper_ctracpkm()) +#ifdef NID_kuznyechik_mgm + || !EVP_add_cipher(cipher_gost_grasshopper_mgm()) +#endif || !EVP_add_cipher(cipher_magma_cbc()) || !EVP_add_cipher(cipher_magma_ctr()) || !EVP_add_digest(digest_gost()) @@ -370,6 +374,10 @@ static int gost_ciphers(ENGINE* e, const EVP_CIPHER** cipher, *cipher = cipher_gost_grasshopper_ctr(); } else if (nid == NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm) { *cipher = cipher_gost_grasshopper_ctracpkm(); +#ifdef NID_kuznyechik_mgm + } else if (nid == NID_kuznyechik_mgm) { + *cipher = cipher_gost_grasshopper_mgm(); +#endif } else if (nid == NID_magma_cbc) { *cipher = cipher_magma_cbc(); } else if (nid == NID_magma_ctr) {