Skip to content

Commit 2d98cc3

Browse files
committed
Convert OpenSSL resources to object
1 parent 9eb7990 commit 2d98cc3

37 files changed

+1083
-764
lines changed

UPGRADING

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,23 @@ PHP 8.0 UPGRADE NOTES
368368
. Several alias functions have been marked as deprecated.
369369
. oci_internal_debug() and its alias ociinternaldebug() have been removed.
370370

371+
- OpenSSL:
372+
. openssl_x509_read() and openssl_csr_sign() will now return an
373+
X509Certificate object rather than a resource. Return value checks using
374+
is_resource() should be replaced with checks for `false`.
375+
. The openssl_x509_free() function is deprecated and no longer has an effect,
376+
instead the X509Certificate instance is automatically destroyed if it is no
377+
longer referenced.
378+
. openssl_csr_new() will now return an X509CertificateSigningRequest object
379+
rather than a resource. Return value checks using is_resource() should be
380+
replaced with checks for `false`.
381+
. openssl_pkey_new() will now return an OpenSSLKey object rather than a
382+
resource. Return value checks using is_resource() should be replaced with
383+
checks for `false`.
384+
. The openssl_pkey_free() function is deprecated and no longer has an effect,
385+
instead the OpenSSLKey instance is automatically destroyed if it is no
386+
longer referenced.
387+
371388
- PCRE:
372389
. When passing invalid escape sequences they are no longer interpreted as
373390
literals. This behaviour previously required the X modifier - which is

Zend/zend_API.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2015,7 +2015,8 @@ static zend_always_inline int zend_parse_arg_str_or_obj(
20152015
) {
20162016
if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
20172017
if (base_ce && UNEXPECTED(!instanceof_function(Z_OBJCE_P(arg), base_ce))) {
2018-
return 0;
2018+
*destination_object = NULL;
2019+
return zend_parse_arg_str_slow(arg, destination_string);
20192020
}
20202021

20212022
*destination_string = NULL;

0 commit comments

Comments
 (0)