You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
8.5 | Regression in openssl_sign() - support for alias algorithms appears to be broken #19369
PR #18516 has been identified as the cause of this regression. @nielsdos has already run a bisect (thanks!) and confirmed that commit 2f5ef4d is the culprit. /cc @bukka
Test
The following test should be able to safeguard against this regression:
--TEST--
openssl_sign: alias algorithm
--EXTENSIONS--
openssl
--FILE--
<?php$digests = openssl_get_md_methods();
$digests_and_aliases = openssl_get_md_methods(true);
$digest_aliases = array_diff($digests_and_aliases, $digests);
$data = "Testing openssl_sign() with alias algorithm";
$privkey = "file://" . __DIR__ . "/private_rsa_1024.key";
// If things work correctly, there should be no output.foreach ($digest_aliasesas$alias) {
if (openssl_sign($data, $sign, $privkey, $alias) === false) {
echo'openssl_sign() failing with alias ', $alias, PHP_EOL;
}
}
?>
--EXPECT--
If it helps, the test can be found in this commit: jrfnl@fb624b6 - let me know if you want me to open a PR to add the test.
As per the above, the test would currently fail on PHP 8.5.
Activity
Fix OpenSSL fetching of alias ciphers
Fix phpGH-19369: openssl_sign() - support for alias digest algs broken
Clean up test for GH-19369 - openssl_sign issue
Fix OpenSSL fetching of alias ciphers