Skip to content

Commit

Permalink
Convert OpenSSL X.509 Certificate resource to object
Browse files Browse the repository at this point in the history
  • Loading branch information
kocsismate committed Jul 22, 2020
1 parent 80b4d49 commit 18a02cc
Show file tree
Hide file tree
Showing 25 changed files with 575 additions and 367 deletions.
8 changes: 8 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,14 @@ PHP 8.0 UPGRADE NOTES
ISO 8859 aliases with underscores (ISO_8859_* and ISO8859_*) have also been
removed.

- OpenSSL:
. openssl_x509_read() and openssl_csr_sign() will now return an
X509Certificate object rather than a resource. Return value checks using
is_resource() should be replaced with checks for `false`.
. The openssl_x509_free() function no longer has an effect, instead the
X509Certificate instance is automatically destroyed if it is no longer
referenced.

- OCI8:
. Several alias functions have been marked as deprecated.
. oci_internal_debug() and its alias ociinternaldebug() have been removed.
Expand Down
9 changes: 8 additions & 1 deletion Zend/zend_API.h
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
#define Z_PARAM_PATH(dest, dest_len) \
Z_PARAM_PATH_EX(dest, dest_len, 0, 0)

#define Z_PARAM_PATH_OR_NULL(dest, dest_len) \
Z_PARAM_PATH_EX(dest, dest_len, 1, 0)

/* old "P" */
#define Z_PARAM_PATH_STR_EX2(dest, check_null, deref, separate) \
Z_PARAM_PROLOGUE(deref, separate); \
Expand Down Expand Up @@ -1682,6 +1685,9 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_argument_value_error(uint32_t arg_num
#define Z_PARAM_ZVAL(dest) \
Z_PARAM_ZVAL_EX(dest, 0, 0)

#define Z_PARAM_ZVAL_OR_NULL(dest) \
Z_PARAM_ZVAL_EX(dest, 1, 0)

/* old "+" and "*" */
#define Z_PARAM_VARIADIC_EX(spec, dest, dest_num, post_varargs) do { \
uint32_t _num_varargs = _num_args - _i - (post_varargs); \
Expand Down Expand Up @@ -2008,7 +2014,8 @@ static zend_always_inline int zend_parse_arg_str_or_obj(
) {
if (EXPECTED(Z_TYPE_P(arg) == IS_OBJECT)) {
if (base_ce && UNEXPECTED(!instanceof_function(Z_OBJCE_P(arg), base_ce))) {
return 0;
*destination_object = NULL;
return zend_parse_arg_str_slow(arg, destination_string);
}

*destination_string = NULL;
Expand Down
Loading

0 comments on commit 18a02cc

Please sign in to comment.