Title: ext-openssl is inconsistent in cipher algorithm accepted in functions vs the ones returned by openssl_get_cipher_methods · Issue #19994 · php/php-src · GitHub
Open Graph Title: ext-openssl is inconsistent in cipher algorithm accepted in functions vs the ones returned by openssl_get_cipher_methods · Issue #19994 · php/php-src
X Title: ext-openssl is inconsistent in cipher algorithm accepted in functions vs the ones returned by openssl_get_cipher_methods · Issue #19994 · php/php-src
Description: Description The following code:
Open Graph Description: Description The following code:
X Description: Description The following code: <?php $ciphers = openssl_get_cipher_methods(); foreach ($ciphers as $cipher) { echo $cipher.': '; echo openssl_cipher_iv_length($cipher); echo "\n&qu...
Opengraph URL: https://github.com/php/php-src/issues/19994
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ext-openssl is inconsistent in cipher algorithm accepted in functions vs the ones returned by openssl_get_cipher_methods","articleBody":"### Description\n\nThe following code:\n\n```php\n\u003c?php\n\n$ciphers = openssl_get_cipher_methods();\n\nforeach ($ciphers as $cipher) {\n echo $cipher.': ';\n echo openssl_cipher_iv_length($cipher);\n echo \"\\n\";\n}\n```\n\nResulted in this output:\n```\naes-128-cbc: 16\naes-128-cbc-cts: PHP Warning: openssl_cipher_iv_length(): Unknown cipher algorithm in /home/stof/src/Incenteev/Incenteev/build/tmp.php on line 15\nPHP Stack trace:\nPHP 1. {main}() /home/stof/src/Incenteev/Incenteev/build/tmp.php:0\nPHP 2. openssl_cipher_iv_length($cipher_algo = 'aes-128-cbc-cts') /home/stof/src/Incenteev/Incenteev/build/tmp.php:7\n\naes-128-cbc-hmac-sha1: 16\naes-128-cbc-hmac-sha256: 16\naes-128-ccm: 12\naes-128-cfb: 16\naes-128-cfb1: 16\naes-128-cfb8: 16\naes-128-ctr: 16\naes-128-ecb: 0\naes-128-gcm: 12\naes-128-ocb: 12\naes-128-ofb: 16\naes-128-siv: PHP Warning: openssl_cipher_iv_length(): Unknown cipher algorithm in /home/stof/src/Incenteev/Incenteev/build/tmp.php on line 15\nPHP Stack trace:\nPHP 1. {main}() /home/stof/src/Incenteev/Incenteev/build/tmp.php:0\nPHP 2. openssl_cipher_iv_length($cipher_algo = 'aes-128-siv') /home/stof/src/Incenteev/Incenteev/build/tmp.php:7\n\n[REDACTED: more algorithms]\n```\n\nBut I expected this output instead: no warnings about unknown algorithms, as I'm using the list of known algorithms as input.\n\n### PHP Version\n\n```plain\nPHP 8.3.25 (cli) (built: Aug 29 2025 12:01:53) (NTS)\nCopyright (c) The PHP Group\nZend Engine v4.3.25, Copyright (c) Zend Technologies\n with Zend OPcache v8.3.25, Copyright (c), by Zend Technologies\n with Xdebug v3.4.5, Copyright (c) 2002-2025, by Derick Rethans\n with blackfire v1.92.44~linux-x64-non_zts83, https://blackfire.io, by Blackfire\n\nIn case this is relevant, I'm using OpenSSL 3.0.13\n```\n\n### Operating System\n\nUbuntu 24.04","author":{"url":"https://github.com/stof","@type":"Person","name":"stof"},"datePublished":"2025-09-29T15:58:45Z","url":"https://github.com/php/php-src/issues/19994"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f552695f-e72f-bda3-6285-0278bd83c285 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7A0:842EC:98F8F1:CDC7F0:6B00EA5B |
| html-safe-nonce | adf25489968905edcff76f25b6cf5733fb148db4a881792d363545d50aa986f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0EwOjg0MkVDOjk4RjhGMTpDREM3RjA6NkIwMEVBNUIiLCJ2aXNpdG9yX2lkIjoiODg5MTI5NTExNDQ2NzUzNTQ1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bf4462eb073d9f4bcdc7c46fc95e9a17ec12242b195485e057bcd208a67951d4 |
| hovercard-subject-tag | issue:3465644824 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/php/php-src/19994/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f702df3f069a9ad0eb8f92cd22e71aba8f7c1c52f7ff707351096f4b4a1845d4/php/php-src/issues/19994 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f702df3f069a9ad0eb8f92cd22e71aba8f7c1c52f7ff707351096f4b4a1845d4/php/php-src/issues/19994 |
| og:image:alt | Description The following code: |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stof |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/php/php-src git https://github.com/php/php-src.git |
| octolytics-dimension-user_id | 25158 |
| octolytics-dimension-user_login | php |
| octolytics-dimension-repository_id | 1903522 |
| octolytics-dimension-repository_nwo | php/php-src |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1903522 |
| octolytics-dimension-repository_network_root_nwo | php/php-src |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width