mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Use EVP_MD_CTX_destroy() instead of EVP_MD_CTX_free() for compatibility and consistency
This commit is contained in:
1
NEWS
1
NEWS
@@ -33,6 +33,7 @@ PHP NEWS
|
||||
. Fixed bug GH-20732 (Phar::LoadPhar undefined behavior when reading fails).
|
||||
(ndossche)
|
||||
. Fix SplFileInfo::openFile() in write mode. (ndossche)
|
||||
. Fix build on legacy OpenSSL 1.1.0 systems. (Giovanni Giacobbi)
|
||||
|
||||
- SPL:
|
||||
. Fixed bug GH-20678 (resource created by GlobIterator crashes with fclose()).
|
||||
|
||||
@@ -1954,7 +1954,7 @@ zend_result phar_create_signature(phar_archive_data *phar, php_stream *fp, char
|
||||
|
||||
if (!EVP_SignInit(md_ctx, mdtype)) {
|
||||
EVP_PKEY_free(key);
|
||||
EVP_MD_CTX_free(md_ctx);
|
||||
EVP_MD_CTX_destroy(md_ctx);
|
||||
efree(sigbuf);
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to initialize openssl signature for phar \"%s\"", phar->fname);
|
||||
@@ -1965,7 +1965,7 @@ zend_result phar_create_signature(phar_archive_data *phar, php_stream *fp, char
|
||||
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);
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to update the openssl signature for phar \"%s\"", phar->fname);
|
||||
@@ -1976,7 +1976,7 @@ zend_result phar_create_signature(phar_archive_data *phar, php_stream *fp, char
|
||||
|
||||
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);
|
||||
if (error) {
|
||||
spprintf(error, 0, "unable to write phar \"%s\" with requested openssl signature", phar->fname);
|
||||
@@ -1986,7 +1986,7 @@ zend_result phar_create_signature(phar_archive_data *phar, php_stream *fp, char
|
||||
|
||||
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