## Category `stdlib` · AOT happy-path leftover of #33497 / #7268 ## Problem `#33497` baked catchable argc/TypeError for `openssl_x509_read()`, but the string/OpenSSLCertificate happy path still throws: `openssl_x509_read() is not implemented for JIT in this compiler build (issue #7268)` Peer happy-path AOT bakes already landed for `openssl_pkey_get_private` (#34037) and `openssl_pkey_get_public` (#34038). | Repro | Zend / VM | AOT thin (master) | |-------|-----------|-------------------| | `openssl_x509_read($pemLiteral)` | `OpenSSLCertificate` | LogicException at compile | | `openssl_x509_read($cert)` passthrough | `OpenSSLCertificate` | LogicException at compile | | `openssl_x509_read(null)` | TypeError | TypeError (already #33497) | ## php-src reference - [php/php-src `ext/openssl/xp.c`](https://github.com/php/php-src/blob/master/ext/openssl/xp.c) — `PHP_FUNCTION(openssl_x509_read)` - [php/php-src `ext/openssl/openssl.stub.php`](https://github.com/php/php-src/blob/master/ext/openssl/openssl.stub.php) ## PHP implementation target - `ext/openssl/openssl_x509_read.php` — call into new `JitOpensslX509Read` bake (peer `JitOpensslPkeyGetPrivate`) - Compile-time PEM literal → `VmOpensslX509Native::normalizeCertificatePem` → allocate `OpenSSLCertificate` with `__osslPem` - Known `OpenSSLCertificate` object → passthrough - `lib/JIT/Builtin/Type/Object_.php` — declare `__osslPem` on `opensslcertificate` (peer asymmetric key) - No new `runtime/*.c` ## Repro ```bash ./script/aot-smoke.sh # must stay 8/8 ./script/docker-exec.sh -- bash -lc 'PHP_COMPILER_HELPER_RUNTIME_O=0 php bin/compile.php -o /tmp/x test/repro/issue_NNNN_openssl_x509_read_happy_aot.php && /tmp/x' ``` ## Done when - [ ] AOT matches VM/Zend on PEM literal → `OpenSSLCertificate` and object passthrough - [ ] `./script/aot-smoke.sh` still 8/8 - [ ] Targeted `./script/phpunit.sh --filter IssueNNNN…` - [ ] No new `runtime/*.c`
Activity
PurHur commentedon Aug 23, 2026
claim: implementing openssl_x509_read thin AOT happy-path bake (peer #34037 pkey_get_private) — PEM literal → OpenSSLCertificate + __osslPem.
Stdlib: openssl_x509_read thin AOT bake via OpenSSLCertificate (#34048)…
Stdlib: openssl_csr_get_public_key thin AOT bake from CSR PEM (#34054) (
Stdlib: openssl_csr_sign thin AOT bake from CSR/key PEM (#34060) (#34065
Stdlib: openssl_csr_new thin AOT bake from DN + key PEM (#34061) (#34068