]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - gost_md2012.c
Move openssl-1.0.2 shim layer here
[openssl-gost/engine.git] / gost_md2012.c
index 9385b080c908c9df0426d76b1fdb65f719206cc4..5462dea84c6cf0dc869c155fb47ef0abc08178b6 100644 (file)
@@ -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))