From: Vitaly Chikunov Date: Thu, 19 Jul 2018 00:58:06 +0000 (+0300) Subject: Produce correct GOST signatures X-Git-Tag: v3.0.0~413 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=4c6fcee148d708f035edaa43e7f26785c15fa7a5;p=openssl-gost%2Fengine.git Produce correct GOST signatures Offset commit 7f572e958b13041056f377a62d3219633cfb1e8a Old openssl still needs EVP_MD_FLAG_PKEY_METHOD_SIGNATURE flag to be set. --- diff --git a/gost_md.c b/gost_md.c index 5d2c537..c088f86 100644 --- a/gost_md.c +++ b/gost_md.c @@ -27,6 +27,7 @@ EVP_MD *digest_gost(void) EVP_MD *md; if ((md = EVP_MD_meth_new(NID_id_GostR3411_94, NID_undef)) == NULL + || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) || !EVP_MD_meth_set_result_size(md, 32) || !EVP_MD_meth_set_input_blocksize(md, 32) || !EVP_MD_meth_set_app_datasize(md, diff --git a/gost_md2012.c b/gost_md2012.c index 5acb111..9385b08 100644 --- a/gost_md2012.c +++ b/gost_md2012.c @@ -37,6 +37,7 @@ EVP_MD *digest_gost2012_256(void) if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_256, NID_undef)) == NULL + || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) || !EVP_MD_meth_set_result_size(md, 32) || !EVP_MD_meth_set_input_blocksize(md, 64) || !EVP_MD_meth_set_app_datasize(md, sizeof(gost2012_hash_ctx)) @@ -67,6 +68,7 @@ EVP_MD *digest_gost2012_512(void) if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_512, NID_undef)) == NULL + || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) || !EVP_MD_meth_set_result_size(md, 64) || !EVP_MD_meth_set_input_blocksize(md, 64) || !EVP_MD_meth_set_app_datasize(md, sizeof(gost2012_hash_ctx))