From: Dmitry Eremin-Solenikov Date: Wed, 6 Nov 2019 17:11:21 +0000 (+0300) Subject: ameth: fill digestParamSet for the sake of backwards compatibility X-Git-Tag: v3.0.0~261 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=d47b346150868622f42178994fc26f799a80410a;p=openssl-gost%2Fengine.git ameth: fill digestParamSet for the sake of backwards compatibility Even though it is not recommended by R 1323565.1.023-2018 fill digestParamSet field for 512-bit curves Test, TC26-A, TC26-B because old cryptoproviders expect this field to be present. Signed-off-by: Dmitry Eremin-Solenikov --- diff --git a/gost_ameth.c b/gost_ameth.c index 22631c0..7fe05c8 100644 --- a/gost_ameth.c +++ b/gost_ameth.c @@ -79,6 +79,12 @@ static ASN1_STRING *encode_gost_algor_params(const EVP_PKEY *key) break; case NID_id_GostR3410_2012_512: pkey_param_nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(key_ptr)); + switch (pkey_param_nid) { + case NID_id_tc26_gost_3410_2012_512_paramSetTest: + case NID_id_tc26_gost_3410_2012_512_paramSetA: + case NID_id_tc26_gost_3410_2012_512_paramSetB: + gkp->hash_params = OBJ_nid2obj(NID_id_GostR3411_2012_512); + } break; case NID_id_GostR3410_2001: pkey_param_nid = EC_GROUP_get_curve_name(EC_KEY_get0_group(key_ptr));