]> granicus.if.org Git - apache/commitdiff
EVP_MD_CTX_new() and EVP_MD_CTX_free()
authorRainer Jung <rjung@apache.org>
Sun, 7 Feb 2016 21:10:16 +0000 (21:10 +0000)
committerRainer Jung <rjung@apache.org>
Sun, 7 Feb 2016 21:10:16 +0000 (21:10 +0000)
Only exist in OpenSSL 1.1.0. They were
renamed from EVP_MD_CTX_create() and
EVP_MD_CTX_destroy().

Followup to r1728979.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729037 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_ct_sct.c

index e9e3ba307c91d1a33ab1ec933251cea5abade5be..6870d6600b7ec6a3bf02f1ae307bad2869957ddc 100644 (file)
@@ -32,12 +32,20 @@ static apr_status_t verify_signature(sct_fields_t *sctf,
         return APR_EINVAL;
     }
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    ctx = EVP_MD_CTX_create();
+#else
     ctx = EVP_MD_CTX_new();
+#endif
     ap_assert(1 == EVP_VerifyInit(ctx, EVP_sha256()));
     ap_assert(1 == EVP_VerifyUpdate(ctx, sctf->signed_data,
                                     sctf->signed_data_len));
     rc = EVP_VerifyFinal(ctx, sctf->sig, sctf->siglen, pkey);
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+    EVP_MD_CTX_destroy(ctx);
+#else
     EVP_MD_CTX_free(ctx);
+#endif
 
     return rc == 1 ? APR_SUCCESS : APR_EINVAL;
 }