httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1729037 - /httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c
Date Sun, 07 Feb 2016 21:10:16 GMT
Author: rjung
Date: Sun Feb  7 21:10:16 2016
New Revision: 1729037

URL: http://svn.apache.org/viewvc?rev=1729037&view=rev
Log:
EVP_MD_CTX_new() and EVP_MD_CTX_free()
Only exist in OpenSSL 1.1.0. They were
renamed from EVP_MD_CTX_create() and
EVP_MD_CTX_destroy().

Followup to r1728979.

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c?rev=1729037&r1=1729036&r2=1729037&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_ct_sct.c Sun Feb  7 21:10:16 2016
@@ -32,12 +32,20 @@ static apr_status_t verify_signature(sct
         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;
 }



Mime
View raw message