diff options
author | Vitaly Chikunov <vt@altlinux.org> | 2018-07-25 09:13:22 +0300 |
---|---|---|
committer | Vitaly Chikunov <vt@altlinux.org> | 2018-07-25 11:00:00 +0300 |
commit | eb01b80247de3fa3848d58d7f2816aff8f396630 (patch) | |
tree | 1bfe42ad223e9717c10767875d60e21c66a9845b /gost_md2012.c | |
parent | 767ac3fdf61c3aaec9069a9a42bbb39b3b772574 (diff) | |
download | gost-engine-eb01b80247de3fa3848d58d7f2816aff8f396630.zip gost-engine-eb01b80247de3fa3848d58d7f2816aff8f396630.tar.gz gost-engine-eb01b80247de3fa3848d58d7f2816aff8f396630.tar.bz2 |
Move openssl-1.0.2 shim layer here
Previously, we had shim layer in our openssl branch
Could be squashed with 01d26132d156ba9fff7a8142d5a6899d7b2e6286
Diffstat (limited to 'gost_md2012.c')
-rw-r--r-- | gost_md2012.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 <openssl/evp.h> #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)) |