From eb01b80247de3fa3848d58d7f2816aff8f396630 Mon Sep 17 00:00:00 2001 From: Vitaly Chikunov Date: Wed, 25 Jul 2018 09:13:22 +0300 Subject: Move openssl-1.0.2 shim layer here Previously, we had shim layer in our openssl branch Could be squashed with 01d26132d156ba9fff7a8142d5a6899d7b2e6286 --- gost_md2012.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gost_md2012.c') diff --git a/gost_md2012.c b/gost_md2012.c index 9385b08..5462dea 100644 --- a/gost_md2012.c +++ b/gost_md2012.c @@ -9,6 +9,7 @@ * * **********************************************************************/ +#include "compat.h" #include #include "gosthash2012.h" @@ -37,7 +38,9 @@ EVP_MD *digest_gost2012_256(void) if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_256, NID_undef)) == NULL +#if (OPENSSL_VERSION_NUMBER <= 0x10002100L) || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) +#endif || !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)) @@ -68,7 +71,9 @@ EVP_MD *digest_gost2012_512(void) if ((md = EVP_MD_meth_new(NID_id_GostR3411_2012_512, NID_undef)) == NULL +#if (OPENSSL_VERSION_NUMBER <= 0x10002100L) || !EVP_MD_meth_set_flags(md, EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) +#endif || !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)) -- cgit v1.1