Skip to content

php-in-php: OpenSSL introspection without host ext/openssl delegation (#6228) - #8025

Merged
PurHur merged 1 commit into
masterfrom
agent/runtime-php-openssl-introspect-6228
Jun 11, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/runtime-php-openssl-introspect-6228

Conversation

@PurHur

@PurHur PurHur commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement openssl_get_cipher_methods(), openssl_get_md_methods(), and openssl_digest() in PHP (ext/openssl/OpensslCipherRegistry.php, VmOpenssl.php) using native cipher IV table + VmHashNative digests.
  • Drop host function_exists('openssl_cipher_iv_length') delegation from VmOpenssl::cipher_iv_length() — self-host/AOT no longer depends on Zend ext/openssl for introspection.
  • 0 C runtime lines added; host bridge lines removed from VmOpenssl.php.

php-src reference

  • ext/openssl/openssl.c — openssl_get_cipher_methods, openssl_get_md_methods, openssl_cipher_iv_length, openssl_digest

Verification

docker info >/dev/null
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php test/repro/maintainer_openssl_introspect.php
php bin/vm.php test/repro/maintainer_openssl_introspect.php
vendor/bin/phpunit --filter "OpensslModuleTest|VmOpensslRuntimeShrinkTest|openssl_digest|openssl_get_cipher_methods|openssl_cipher_iv_length"
'

Output (VM repro):

openssl_get_cipher_methods: yes
openssl_get_md_methods: yes
openssl_cipher_iv_length: yes
openssl_digest: yes
3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7
cipher_ok

PHPUnit: OK (13 tests, 28 assertions)

Closes #6228

Made with Cursor

…#6228)

Implement openssl_get_cipher_methods(), openssl_get_md_methods(), and
openssl_digest() in PHP via OpensslCipherRegistry + VmHash; drop host
function_exists() bridge from openssl_cipher_iv_length().

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant