Skip to content

Stdlib: openssl_x509_check_private_key() JIT/AOT lowering missing — VM path only (ext/openssl/openssl.c) #32527

Closed

Description

@PurHur

Category

Stdlib · JIT/AOT leftover of #20285 (ext/openssl/openssl.c openssl_x509_check_private_key)

Problem

VM path is green (#20285). JIT/AOT still throws:

openssl_x509_check_private_key() is not implemented for JIT in this compiler build (issue #20285)

docs/capabilities.md advertises yes / no / no. Peer leftover: openssl_x509_fingerprint() bake (#32512 leftover of #6524). #32522 owns openssl_x509_checkpurpose().

Thin-standalone AOT has no PHP FFI, so NestedJIT of VmOpensslX509Native cannot call X509_check_private_key. Bake from compile-time PEM literals in the compiler process (same as parse/fingerprint).

Repro Zend 8.2+ / VM AOT (master)
openssl_x509_check_private_key($certPem, $keyPem) matching true compile abort
mismatched key false compile abort
'not-a-cert' false compile abort

php-src reference

PHP implementation target

  • ext/openssl/JitOpensslX509.php — bake VmOpensslX509Native::checkPrivateKeyPem from compile-time string PEMs
  • ext/openssl/openssl_x509_check_private_key.php call() — ACE then JitOpensslX509::checkPrivateKey
  • no new runtime/*.c

Repro

./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/openssl_x509_check_private_key_20285.php'
./script/docker-exec.sh -- bash -lc 'php bin/compile.php -o /tmp/ck.bin test/repro/issue_openssl_x509_check_private_key_aot.php && /tmp/ck.bin'

Done when

  • AOT matching PEM pair is true; mismatched / invalid is false
  • VM still matches Zend
  • capability matrix JIT/AOT yes; no new runtime/*.c
  • targeted phpunit filter green; aot-smoke stays 8/8

Activity

  1. added
    bugSomething isn't working
    phase-4:stdlibPhase 4 – stdlib for web apps
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Aug 19, 2026
  2. PurHur commented on Aug 19, 2026

    @PurHur
    OwnerAuthor

    claim: advanced-stdlib-ext — leftover of #20285; bake X509_check_private_key from compile-time PEM literals (peer #32512 fingerprint). #32522 owns checkpurpose.

  3. PurHur commented on Aug 19, 2026

    @PurHur
    OwnerAuthor

    claim: io-crypto-text — implementing leftover of #20285 this run (bake X509_check_private_key from compile-time PEM literals). No branch/PR on the prior claim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:compilerCompiler / CFG / JITbugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions