Skip to content

Openssl: openssl_x509_verify() certificate signature check (#6595)#18528

Merged
PurHur merged 2 commits into
masterfrom
agent/issue-6595-openssl-x509-verify
Jul 13, 2026
Merged

Openssl: openssl_x509_verify() certificate signature check (#6595)#18528
PurHur merged 2 commits into
masterfrom
agent/issue-6595-openssl-x509-verify

Conversation

@PurHur

@PurHur PurHur commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement openssl_x509_verify() on VM via libcrypto FFI (X509_verify, X509_get_pubkey) in ext/openssl/VmOpensslX509Native.php — php-src ext/openssl/x509.c.
  • Accept OpenSSLCertificate|string cert and OpenSSLAsymmetricKey|OpenSSLCertificate|string public key; enum operands raise TypeError.
  • Register builtin + compliance guard; sync spine/bootstrap inventory for ext/openssl/openssl_x509_verify.php.

php-src reference

  • ext/openssl/x509.cPHP_FUNCTION(openssl_x509_verify)

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php -r "echo function_exists(\"openssl_x509_verify\")?\"yes\":\"no\";"'
# yes

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && ./vendor/bin/phpunit --filter openssl_x509_verify'
# OK (2 tests, 2 assertions)

./script/docker-exec.sh -- bash -lc 'php script/check-selfhost-spine-coverage-sync.php && php script/bootstrap-inventory.php --check'
# OK 4742/4742

./script/ci-fast.sh
# exit 0

Closes #6595

Made with Cursor

PurHur and others added 2 commits July 13, 2026 06:30
Add X509_verify certificate signature checking on VM using existing
VmOpensslX509Native FFI helpers; register builtin and compliance guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate bootstrap-inventory.md after conflict resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 919eb80 into master Jul 13, 2026
@PurHur
PurHur deleted the agent/issue-6595-openssl-x509-verify branch July 13, 2026 06:31
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.

Stdlib: openssl_x509_verify() — certificate signature verification missing (ext/openssl/x509.c)

1 participant