mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.5'
* PHP-8.5: Use EVP_MD_CTX_destroy() instead of EVP_MD_CTX_free() for compatibility and consistency
This commit is contained in:
@@ -1881,7 +1881,7 @@ ZEND_ATTRIBUTE_NONNULL zend_result phar_create_signature(phar_archive_data *phar
|
||||
|
||||
if (!EVP_SignInit(md_ctx, mdtype)) {
|
||||
EVP_PKEY_free(key);
|
||||
EVP_MD_CTX_free(md_ctx);
|
||||
EVP_MD_CTX_destroy(md_ctx);
|
||||
efree(sigbuf);
|
||||
spprintf(error, 0, "unable to initialize openssl signature for phar \"%s\"", phar->fname);
|
||||
return FAILURE;
|
||||
@@ -1890,7 +1890,7 @@ ZEND_ATTRIBUTE_NONNULL zend_result phar_create_signature(phar_archive_data *phar
|
||||
while ((sig_len = php_stream_read(fp, (char*)buf, sizeof(buf))) > 0) {
|
||||
if (!EVP_SignUpdate(md_ctx, buf, sig_len)) {
|
||||
EVP_PKEY_free(key);
|
||||
EVP_MD_CTX_free(md_ctx);
|
||||
EVP_MD_CTX_destroy(md_ctx);
|
||||
efree(sigbuf);
|
||||
spprintf(error, 0, "unable to update the openssl signature for phar \"%s\"", phar->fname);
|
||||
return FAILURE;
|
||||
@@ -1899,7 +1899,7 @@ ZEND_ATTRIBUTE_NONNULL zend_result phar_create_signature(phar_archive_data *phar
|
||||
|
||||
if (!EVP_SignFinal (md_ctx, sigbuf, &siglen, key)) {
|
||||
EVP_PKEY_free(key);
|
||||
EVP_MD_CTX_free(md_ctx);
|
||||
EVP_MD_CTX_destroy(md_ctx);
|
||||
efree(sigbuf);
|
||||
spprintf(error, 0, "unable to write phar \"%s\" with requested openssl signature", phar->fname);
|
||||
return FAILURE;
|
||||
@@ -1907,7 +1907,7 @@ ZEND_ATTRIBUTE_NONNULL zend_result phar_create_signature(phar_archive_data *phar
|
||||
|
||||
sigbuf[siglen] = '\0';
|
||||
EVP_PKEY_free(key);
|
||||
EVP_MD_CTX_free(md_ctx);
|
||||
EVP_MD_CTX_destroy(md_ctx);
|
||||
#else
|
||||
size_t siglen;
|
||||
sigbuf = NULL;
|
||||
|
||||
Reference in New Issue
Block a user