From: Pierre Joye Date: Sun, 30 Nov 2008 21:39:57 +0000 (+0000) Subject: - #44900, OpenSSL extension fails to link with OpenSSL 0.9.6 (5.2 only, 5.3+ requires... X-Git-Tag: php-5.2.8~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d1a87fb88efdb5d792a0c397eff580431921ada;p=php - #44900, OpenSSL extension fails to link with OpenSSL 0.9.6 (5.2 only, 5.3+ requires a decent version) --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 341fe1c3ad..b170249f94 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -3535,7 +3535,9 @@ PHP_FUNCTION(openssl_sign) efree(sigbuf); RETVAL_FALSE; } +#if OPENSSL_VERSION_NUMBER >= 0x0090700fL EVP_MD_CTX_cleanup(&md_ctx); +#endif if (keyresource == -1) { EVP_PKEY_free(pkey); } @@ -3575,7 +3577,9 @@ PHP_FUNCTION(openssl_verify) EVP_VerifyInit (&md_ctx, mdtype); EVP_VerifyUpdate (&md_ctx, data, data_len); err = EVP_VerifyFinal (&md_ctx, (unsigned char *)signature, signature_len, pkey); +#if OPENSSL_VERSION_NUMBER >= 0x0090700fL EVP_MD_CTX_cleanup(&md_ctx); +#endif if (keyresource == -1) { EVP_PKEY_free(pkey);