1
0
mirror of https://github.com/php/php-src.git synced 2026-04-12 18:43:37 +02:00
Commit Graph

1616 Commits

Author SHA1 Message Date
Max Semenik
2b5de6f839 Remove proto comments from C files
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
0280b83e11 Avoid some unnecessary uses of no_separation=0
For the rare cases where references are part of the API,
construct them explicitly. Otherwise do not allow separation.
2020-07-06 19:05:57 +02:00
Fabien Villepinte
0c6d06ecfa Replace EXPECTF when possible
Closes GH-5779
2020-06-29 21:31:44 +02:00
Nikita Popov
c9b9f525a9 Include stub hash in generated arginfo files
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.

This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.

Closes GH-5739.
2020-06-24 09:55:19 +02:00
Nikita Popov
cd7d96610c Merge branch 'PHP-7.4' 2020-06-19 09:44:56 +02:00
Nikita Popov
21a2da2349 Generate temporary config file when generating certificates
The putenv trick doesn't work on ZTS Windows, so generate a new
openssl config every time.
2020-06-19 09:43:56 +02:00
Nikita Popov
b5f5da4211 Merge branch 'PHP-7.4' 2020-06-18 15:56:14 +02:00
Nikita Popov
8ba0624a09 Downgrade server security level in security level test
We want to test the client side error here, so make sure the
server side can start up successfully.
2020-06-18 15:54:02 +02:00
Nikita Popov
472352f5a7 Merge branch 'PHP-7.4' 2020-06-18 15:49:43 +02:00
Nikita Popov
c7fe71c8b7 Add SubjectAltName support to certificate generator
And switch tests using SAN certificates to the generator.

This is ugly, but there doesn't seem to be a more direct way
to privide SAN in PHP.
2020-06-18 15:49:08 +02:00
Nikita Popov
c2a6395dcb Downgrade security level in tests using TLS < 1.2
A few additional tests have been added on master that require
lower security level.
2020-06-18 15:08:24 +02:00
Nikita Popov
f3ff070034 Merge branch 'PHP-7.4' 2020-06-18 15:02:02 +02:00
Nikita Popov
72b3987c2d Generate certificates for bug69215.phpt 2020-06-18 14:58:48 +02:00
Nikita Popov
58ca47aff6 Generate certificate for bug68920.phpt
The certificate really doesn't matter here, but it still needs to
comply with security level...
2020-06-18 14:49:15 +02:00
Nikita Popov
dd7d161ccf Generate certificate for bug65729.pem
Make this test pass under security level 2.
2020-06-18 14:43:57 +02:00
Nikita Popov
4f0ae4ad6e Merge branch 'PHP-7.4' 2020-06-18 14:22:29 +02:00
Nikita Popov
2c0d47c4b4 Revert "Fix tests regarding OpenSSL security_level"
This reverts commit b281493503.
2020-06-18 14:22:20 +02:00
Nikita Popov
51e3cb3916 Don't generate spurious warning is security_level not supported
People should not have to worry about the used openssl version
when downgrading security_level.
2020-06-18 14:21:53 +02:00
Christoph M. Becker
5989b09d18 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix tests regarding OpenSSL security_level
2020-06-18 13:29:33 +02:00
Christoph M. Becker
b281493503 Fix tests regarding OpenSSL security_level
The `security_level` stream option is only available as of OpenSSL
1.1.0, so we only set it for these versions.  Older OpenSSL versions
do not have security levels at all.
2020-06-18 13:28:09 +02:00
Nikita Popov
20664d6023 Merge branch 'PHP-7.4' 2020-06-18 10:49:56 +02:00
Nikita Popov
6b702eea15 Migrate some tests to certificate generator
This migrates all the tests using ext/openssl/tests/streams_crypto_method.pem
to the certificate generator, so we can easily adjust needed parameters.
In particular, this makes the cert security level 2 compatible.

However, we still need to downgrade security_level to 1 in a number
of tests, because they are testing TLS < 1.2 connections.
2020-06-18 10:49:36 +02:00
Nikita Popov
9b70a831a2 Merge branch 'PHP-7.4' 2020-06-17 22:16:11 +02:00
Nikita Popov
52c2f1126d Use sha256 as digest algorithm in certificate generator
This makes the generated certificates compatible with security
level 2, which is apparently the default on Ubuntu 20.04.

Unfortunately this does not fix all tests, because some are using
pre-generated certificates.
2020-06-17 22:15:00 +02:00
Christoph M. Becker
4b76a2ddb3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #62890: default_socket_timeout=-1 causes connection to timeout
2020-06-09 16:48:41 +02:00
Christoph M. Becker
85657b486f Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #62890: default_socket_timeout=-1 causes connection to timeout
2020-06-09 16:47:00 +02:00
Christoph M. Becker
eadd980706 Fix #62890: default_socket_timeout=-1 causes connection to timeout
While unencrypted connections ignore negative timeouts, SSL/TLS
connections did not special case that, and so always failed due to
timeout.
2020-06-09 16:45:34 +02:00
twosee
88355dd338 Constify char * arguments of APIs
Closes GH-5676.
2020-06-08 10:38:45 +02:00
Nikita Popov
57e17e58a5 Fix leak in openssl_cms_read() 2020-06-08 10:13:25 +02:00
Eliot Lear
8583b8a9bf Add support for Cryptographic Message Syntax (CMS)
It add CMS (RFC 5652) support, which is an update to PKCS7.  The functions
are analogous BUT NOT IDENTICAL to openssl_pkcs7*.  In particular, support for
different encodings (PEM, DER, SMIME) is now available.
2020-06-07 16:58:34 +01:00
Nicolas Frandeboeuf
170d63ec62 openssl: Fix openssl_pkcs12_export_to_file extracerts test
Same as https://github.com/php/php-src/pull/2681/files but for openssl_pkcs12_export_to_file

Closes GH-5665
2020-06-05 22:28:01 +02:00
George Peter Banyard
999f65c9cd Fix [-Wundef] warning in OpenSSL extension 2020-05-20 18:22:10 +02:00
Christoph M. Becker
0b04b9347f Enclose contents of CLEAN sections in PHP tags
We also place the CLEAN sections before EXPECT(F), and remove
extraneous clean-ups.
2020-04-29 09:07:53 +02:00
Nikita Popov
8e9bc90004 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79497: Fix php_openssl_subtract_timeval()
2020-04-20 10:26:45 +02:00
Nikita Popov
a230b5a6c9 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79497: Fix php_openssl_subtract_timeval()
2020-04-20 10:26:22 +02:00
Joe Cai
94e09bfe55 Fix #79497: Fix php_openssl_subtract_timeval()
I stumbled upon this while debugging a strange issue with
stream_socket_client() where it randomly throws out errors when
the connection timeout is set to below 1s. The logic to calculate
time difference in php_openssl_subtract_timeval() is wrong when
a.tv_usec < b.tv_usec, causing connection errors before the timeout
is reached.
2020-04-20 10:25:54 +02:00
Máté Kocsis
3709e74b5e Store default parameter values of internal functions in arg info
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-04-08 18:37:51 +02:00
Máté Kocsis
21cfa03f17 Generate function entries for another batch of extensions
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis
a43bc33fb2 Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Christoph M. Becker
919adcf161 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enable error diagnostic for check_default_conf_path.phpt
2020-04-01 19:21:46 +02:00
Christoph M. Becker
71e1d37938 Enable error diagnostic for check_default_conf_path.phpt
Otherwise we have no clue why the test failed, if the regex didn't
match.
2020-04-01 19:20:35 +02:00
Máté Kocsis
01b266aac4 Improve error messages of various extensions
Closes GH-5278
2020-03-23 18:59:04 +01:00
Máté Kocsis
960318ed95 Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
George Peter Banyard
1fdc53bc96 Remove deprecated capture_session_meta OpenSSL stream context
Closes GH-5200
2020-02-26 03:09:13 +01:00
Máté Kocsis
736b22dc0b Add stubs for aliases
Closes GH-5187
2020-02-18 21:10:36 +01:00
Máté Kocsis
ac0853eb26 Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00
Christoph M. Becker
7d0102dfa7 Revert "Replace @param annotations with type declarations"
This reverts commit c31029f335.
2020-02-17 08:55:18 +01:00
Christoph M. Becker
c31029f335 Replace @param annotations with type declarations 2020-02-16 23:43:38 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Christoph M. Becker
7cb1a706bb Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79145: openssl memory leak
2020-01-21 16:21:39 +01:00