Commit Graph

794 Commits

Author SHA1 Message Date
Nikita Popov
4276d669d2 Merge branch 'PHP-7.4' 2019-08-09 15:02:57 +02:00
Nikita Popov
69a771346a Fixed bug #78391 2019-08-09 15:02:44 +02:00
Nikita Popov
d8b2b070ec Merge branch 'PHP-7.4' 2019-06-21 15:08:20 +02:00
Nikita Popov
021bb35aec Merge branch 'PHP-7.3' into PHP-7.4 2019-06-21 15:08:12 +02:00
Nikita Popov
66e4b78519 Merge branch 'PHP-7.2' into PHP-7.3 2019-06-21 15:07:59 +02:00
Nikita Popov
99f3e0f0ed Fix PKCS12 leak in openssl 2019-06-21 15:07:37 +02:00
Nikita Popov
c939a67866 Fix d leak in ecc openssl_pkey_new 2019-06-21 15:07:32 +02:00
Nikita Popov
dfe6f0c1c6 Fix netscape spki leak in openssl 2019-06-21 15:07:26 +02:00
Nikita Popov
a0da2fb2b7 Fix X509 leak in openssl_pkcs7_verify() 2019-06-21 15:07:18 +02:00
Nikita Popov
e0bafc6da4 Fix CSR leaks in openssl 2019-06-21 15:07:10 +02:00
Nikita Popov
bd73332f50 Merge branch 'PHP-7.4' 2019-06-14 15:38:27 +02:00
Rosen Penev
32e6d08dcd Fix compilation without deprecated OpenSSL 1.1 APIs 2019-06-14 15:38:12 +02:00
Dmitry Stogov
e029cc4dd4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Cheaper checks for exceptions thrown from __toString()
2019-06-06 02:23:17 +03:00
Dmitry Stogov
457392fa64 Cheaper checks for exceptions thrown from __toString() 2019-06-06 01:47:22 +03:00
Nikita Popov
7686b0b889 Merge branch 'PHP-7.4' 2019-06-05 14:53:50 +02:00
Nikita Popov
a31f46421d Allow exceptions in __toString()
RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
1df8175b61 Convert fetch_resource warnings into TypeErrors
More type checks that are not part of zpp and should generate a
TypeError in PHP 8.
2019-06-03 09:17:12 +02:00
Jakub Zelenka
4feddd59dc Merge branch 'PHP-7.3' into PHP-7.4 2019-06-02 19:14:37 +01:00
Jakub Zelenka
8f69ca8dcd Merge branch 'PHP-7.2' into PHP-7.3 2019-06-02 19:13:18 +01:00
Jakub Zelenka
2e02579474 Fix bug #78079 (openssl_encrypt_ccm.phpt fails with OpenSSL 1.1.1c)
It also fixes invalid setting of tag length
2019-06-02 19:10:56 +01:00
Nikita Popov
7f26171445 Remove confusing spkstr checks
This is a required parameter, it can never be NULL.
2019-05-31 17:00:00 +02:00
codarrenvelvindron
5c05f5e6d3 Added tls 1.3 support for PHP 2019-04-28 17:37:43 +01:00
Dmitry Stogov
e188e4170f Use ZEND_TRY_ASSIGN_REF_... macros for arguments passed to internal function by reference 2019-04-24 18:28:29 +03:00
Peter Kokot
a8c3e22d23 Replace PHP_TM_GMTOFF with AC_CHECK_MEMBERS
Changes:
- PHP_TM_GMTOFF removed
- HAVE_TM_GMTOFF replaced with HAVE_STRUCT_TM_TM_GMTOFF
- HAVE_TM_ZONE replaced with HAVE_STRUCT_TM_TM_ZONE
- HAVE_TZNAME removed

The PHP_TM_GMTOFF macro can be replaced with Autoconf's AC_CHECK_MEMBERS
that defines the HAVE_STRUCT_TM_TM_GMTOFF symbol instead of the
HAVE_TM_ZONE.

The HAVE_TZNAME symbol is not used in current code. The obsolete
HAVE_TM_ZONE symbol has been replaced with more proper
HAVE_STRUCT_TM_TM_ZONE. These are defined by the AC_STRUCT_TIMEZONE
macro.
2019-03-04 12:13:12 +01:00
Anatol Belski
a5e986181a Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Sync with behavior change in OpenSSL 1.1.1b
2019-02-28 12:53:05 +01:00
Anatol Belski
58d3dd466f Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Sync with behavior change in OpenSSL 1.1.1b
2019-02-28 12:52:28 +01:00
Anatol Belski
19a44ffb7b Sync with behavior change in OpenSSL 1.1.1b
A behavior change in revealed by some openssl_decrypt() based test,
where an encrypt API is used with a decrypt context. The EVP_Cipher*
functions will automatically choose the right operation depending on the
context passed.
2019-02-28 12:48:47 +01:00
Nikita Popov
c0ce258b53 Fix incorrect outbuf freeing 2019-02-08 12:59:48 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
David Carlier
62c7432fa3 Refactor subset of openssl module.
Proposal to abstract a subset of the openssl module,
to be able to use two ways encryption outside of this context.
2019-01-14 19:38:26 +00:00
Nikita Popov
e219ec144e Implement typed properties
RFC: https://wiki.php.net/rfc/typed_properties_v2

This is a squash of PR #3734, which is a squash of PR #3313.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Sammy Kaye Powers
74c0e580ef Improve openssl_random_pseudo_bytes()
CSPRNG implementations should always fail closed. Now
openssl_random_pseudo_bytes() will fail closed by throwing an
`\Exception` in fail conditions.

RFC: https://wiki.php.net/rfc/improve-openssl-random-pseudo-bytes
2019-01-11 11:16:05 +01:00
Ben Scholzen (DASPRiD)
ee939b70d3 Add openssl_x509_verify() function
This patch introduces a wrapper around OpenSSL's X509_verify() function.
2018-11-14 21:40:34 +01:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
b6cc4d2009 Use zval_ptr_dtor() instead of zval_dtor() in internal functions that destroy new created object (This is safer and produces less code) 2018-07-05 11:54:26 +03:00
Dmitry Stogov
265c3ed6cf Fixed incorrrecr zval_dtor() usage to replace value of argument passed by reference, that may lead to memory leaks. 2018-07-05 10:57:49 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Jakub Zelenka
3986b6ab6e Merge branch 'PHP-7.2' 2018-05-22 13:41:22 +01:00
Jakub Zelenka
a231860b02 Merge branch 'PHP-7.1' into PHP-7.2 2018-05-22 13:40:23 +01:00
Jakub Zelenka
68c3d09c2c Fix bug #76174 (openssl extension fails to build with LibreSSL 2.7) 2018-05-22 13:30:58 +01:00
Jakub Zelenka
587cede59d Merge branch 'PHP-7.2' 2018-05-18 17:25:06 +01:00
Jakub Zelenka
b027071688 Merge branch 'PHP-7.1' into PHP-7.2 2018-05-18 17:23:17 +01:00
Erik Lax
d6bc266ba0 Fix bug #76296 (openssl_pkey_get_public does not respect open_basedir) 2018-05-18 17:15:22 +01:00
Jakub Zelenka
2a2bf97a9a Fix keylen type mismatch in openssl_pkey_derive 2018-05-11 17:05:03 +01:00
Jakub Zelenka
a76633444c Fix openssl_pkey_derive arginfo 2018-05-09 19:38:47 +01:00
Jim Zubov
897133fbda Add openssl_pkey_derive 2018-05-09 19:37:01 +01:00
Christoph M. Becker
d5f84fb9c5 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix some arginfos
2018-02-23 11:32:18 +01:00
Christoph M. Becker
c6cf3d4ada Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix some arginfos
2018-02-23 11:29:21 +01:00