Skip to content

Stdlib: openssl_pkey_derive Reflection + named args (#27685) - #27846

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-27685-openssl-pkey-derive-reflection
Aug 5, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-27685-openssl-pkey-derive-reflection

Conversation

@PurHur

@PurHur PurHur commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restore Zend/php-src Reflection for openssl_pkey_derive() (public_key, private_key, int $key_length = 0 → string|false) — function was absent from php-types InternalArgInfo, so arity was 0 and named args failed with Unknown named parameter.
  • PHP-in-PHP only: BuiltinParamNames / BuiltinInternalArgInfo / BuiltinInternalDefaultValues; no runtime/ C.
  • php-src ref: ext/openssl/openssl.stub.php.

Closes #27685

Test plan

  • Zend vs VM identical on issue repro (Reflection + named soft-fail + unknown peer_key)
  • ./script/phpunit.sh test/compliance/OpensslPkeyDeriveReflectionVMTest.php — OK
  • ./script/phpunit.sh --filter testOpensslPkeyDeriveNamedParamsResolve test/unit/BuiltinParamNamesAliasTest.php — OK
  • ./script/phpunit.sh --filter 'testOpensslPkey|openssl_pkey_derive' test/unit/OpensslModuleTest.php — OK (2 tests)
  • php bin/vm.php test/repro/maintainer_gap_openssl_pkey_derive_reflection.php
  • Not covered: full ci-local / AOT (runtime already VM-only for derive; Reflection-only change)
  • Gate snapshot: inventory OK 7020/7020; north-star5-fast red on master (gen-0 manifest mismatch Self-host M5: bootstrap-inventory argv driver size floor — grow beyond 451KB stub #8713) — unrelated

Verification transcript

=== ZEND === / === VM === (identical)
required=2 argc=3
ret=string|false
public_key REQ
private_key REQ
key_length:int OPT=0
named=false
Unknown named parameter $peer_key

Made with Cursor

Wire Zend stub arity/names/types/return via BuiltinParamNames and
BuiltinInternalArgInfo so Reflection and named public_key/private_key
match php-src (absent from php-types InternalArgInfo).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 8b88d7d into master Aug 5, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-27685-openssl-pkey-derive-reflection branch August 5, 2026 18:12
PurHur added a commit that referenced this pull request Aug 5, 2026
…27864)

* Trust: honest gen-0 argv refresh after #27846–#27863 drift (#27860)

Rebuild prelinked/bootstrap-gen0 argv driver from current tip so
lowering_source_fingerprint matches live sources (no restamp).

Co-authored-by: Cursor <cursoragent@cursor.com>

* Trust: prune thin-AOT KeySort/ValueSort helper orphans (#27860)

#27863/#27227 retired NestedJIT HELPER_PATH sites for ksort/krsort and
asort/arsort in favor of HashTable LLVM; fingerprint-stale committed
units made helper-runtime-prelink --strict fail release-readiness.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
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

Development

Successfully merging this pull request may close these issues.

Regression: openssl_pkey_derive Reflection empty — Zend public_key/private_key/key_length + string|false (ext/openssl/openssl.stub.php)

1 participant