X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=gost_eng.c;h=f7ca26318caa6d458c020470456a0692ad339855;hb=004a00404b087b1b3cf3bb515ddc485b07c9fdf2;hp=74fe13e205209c984c5d6e146875d67cec425256;hpb=d370b91c2fa5a5e81ce7a3ab710349f14dd9ed9e;p=openssl-gost%2Fengine.git diff --git a/gost_eng.c b/gost_eng.c index 74fe13e..f7ca263 100644 --- a/gost_eng.c +++ b/gost_eng.c @@ -50,6 +50,11 @@ static int gost_cipher_nids[] = { NID_magma_cbc, NID_magma_ctr, NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm, +#ifdef NID_kuznyechik_mgm + NID_kuznyechik_mgm, +#else + NID_undef, +#endif 0 }; @@ -164,7 +169,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 +285,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 +378,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) {