Skip to content

ext/zip: Fix AES-192 and AES-256 support reporting in phpinfo() - #23319

Merged
LamentXU123 merged 2 commits into
php:PHP-8.4from
LamentXU123:zip-
Aug 16, 2026
Merged

ext/zip: Fix AES-192 and AES-256 support reporting in phpinfo()#23319
LamentXU123 merged 2 commits into
php:PHP-8.4from
LamentXU123:zip-

Conversation

@LamentXU123

@LamentXU123 LamentXU123 commented Aug 16, 2026

Copy link
Copy Markdown
Member

I am speechless. I firstly thought my environment is broken because I seem to be testing my patch on a libzip implementation that doesn't support some of the aes method, and after hours of researching, I find out that phpinfo() shows the wrong constant.

	php_info_print_table_row(2, "AES-128 encryption",
		zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No");
	php_info_print_table_row(2, "AES-192 encryption",
		zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No");
	php_info_print_table_row(2, "AES-256 encryption",
		zip_encryption_method_supported(ZIP_EM_AES_128, 1) ? "Yes" : "No");

Now, AES-128, AES-192, AES-256 are added in a same version. However, this is still not a robust way to tell if we actually support them. Obviously, using their own macro will be better instead of all using aes-128's. This makes the phpinfo page effectively useless.

@LamentXU123
LamentXU123 requested review from devnexen and iliaal August 16, 2026 16:07

@iliaal iliaal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@LamentXU123
LamentXU123 merged commit d9c58ee into php:PHP-8.4 Aug 16, 2026
2 checks passed
LamentXU123 added a commit that referenced this pull request Aug 16, 2026
* PHP-8.5:
  ext/zip: Fix AES-192 and AES-256 support reporting in phpinfo() (#23319)
pull Bot pushed a commit to wudi/php-src that referenced this pull request Aug 16, 2026
* PHP-8.4:
  ext/zip: Fix AES-192 and AES-256 support reporting in phpinfo() (php#23319)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants