Repository navigation
Register OpenSSLCertificate object types and openssl_x509_read() (#7268) - #8294
Merged
Merged
Conversation
…). PHP 8.4 ext/openssl resource→object migration: register the three internal classes, parse PEM certs via host OpenSSL into VM objects, and expose the deprecated openssl_free_key() noop for parity. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
OpenSSLCertificate,OpenSSLAsymmetricKey, andOpenSSLCertificateSigningRequestinternal classes inext/openssl/BuiltinClasses.php(php-srcext/openssl/openssl.stub.php).openssl_x509_read()returningOpenSSLCertificateobjects backed by PEM material via host OpenSSL validation (ext/openssl/xp.c).openssl_free_key()noop matching Zend 8.4 behavior.Closes #7268
php-src reference
ext/openssl/openssl.stub.php— object declarationsext/openssl/xp.c—openssl_x509_read,openssl_free_keyPHP implementation
ext/openssl/VmOpensslObjects.php— class registration + cert lifecycleext/openssl/openssl_x509_read.php,ext/openssl/openssl_free_key.phpVerification
Issue repro:
Output:
Targeted tests:
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && vendor/bin/phpunit --filter OpenSslObjectTypes'Output:
Made with Cursor