]> wagner.pp.ru Git - openssl-gost/engine.git/commitdiff
Make possible build with version of OpenSSL which doesn't support EVP_PKEY_CTRL_GET_MD
authorVictor Wagner <vitus@wagner.pp.ru>
Mon, 5 Oct 2015 19:32:38 +0000 (22:32 +0300)
committerVictor Wagner <vitus@wagner.pp.ru>
Mon, 5 Oct 2015 19:32:38 +0000 (22:32 +0300)
gost_pmeth.c

index 166cf856055187c74bfad9e890a1657ed086b65c..789eeea8918d97ad2ec32d40629a3ada392c1f89 100644 (file)
@@ -118,11 +118,11 @@ static int pkey_gost_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
             GOSTerr(GOST_F_PKEY_GOST_CTRL, GOST_R_INVALID_DIGEST_TYPE);
             return 0;
         }
-
+#ifdef EVP_PKEY_CTRL_GET_MD
     case EVP_PKEY_CTRL_GET_MD:
         *(const EVP_MD **)p2 = pctx->md;
         return 1;
-
+#endif
     case EVP_PKEY_CTRL_PKCS7_ENCRYPT:
     case EVP_PKEY_CTRL_PKCS7_DECRYPT:
     case EVP_PKEY_CTRL_PKCS7_SIGN:
@@ -499,11 +499,11 @@ static int pkey_gost_mac_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
             data->md = (EVP_MD *)p2;
             return 1;
         }
-
+#ifdef EVP_PKEY_CTRL_GET_MD
     case EVP_PKEY_CTRL_GET_MD:
         *(const EVP_MD **)p2 = data->md;
         return 1;
-
+#endif
     case EVP_PKEY_CTRL_PKCS7_ENCRYPT:
     case EVP_PKEY_CTRL_PKCS7_DECRYPT:
     case EVP_PKEY_CTRL_PKCS7_SIGN: