Commit graph

861 commits

Author SHA1 Message Date
Jakub Zelenka
e657f0d3f2 Merge branch 'PHP-7.1' 2017-06-25 18:11:10 +01:00
Jakub Zelenka
0c707fcb10 Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
It fixes bug #71917 (openssl_open() returns junk on envelope < 16 bytes)
and bug #72362 (OpenSSL Blowfish encryption is incorrect for short
keys).
2017-06-25 18:08:50 +01:00
Anatol Belski
d7b9eb981a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
2017-06-24 00:24:56 +02:00
Anatol Belski
b714309056 Fix bug #74798 pkcs7_en/decrypt does not work if \x0a is used in content
The patch for bug #74720 was incomplete.
2017-06-24 00:18:57 +02:00
Jelle van der Waa
787a18a50a Add openssl_pkcs7_read and output P7B in openssl_pkcs7_verify
Add an optional argument to openssl_pkcs7_verify to save the P7B
structure which can contain extra CA intermediate certificates send
along with an S/MIME signed email.

Introduce a new function called openssl_pkcs7_read, which can read a
PKCS#7 structure passed as a string and returns by reference an array
with PEM certificates formatted as a string.
2017-06-22 20:36:23 +01:00
Jakub Zelenka
9dada7b291 Merge branch 'PHP-7.1' 2017-06-16 17:15:11 +01:00
Jakub Zelenka
c2a348b5bc Merge branch 'PHP-7.0' into PHP-7.1 2017-06-16 17:14:23 +01:00
Jelle van der Waa
f19dfac830 openssl: Fix spkstr and spki leak in openssl_spki_new
spkstr is not free'd when running the test and valgrind reports a leak
of 32,318 bytes. The free condition is not met since keyresource is not
NULL, apart from that OPENSSL_free actually free's the allocated memory
by OPENSSL_malloc inside OpenSSL.

Valgrind reports 768 bytes leaked in openssl_spki_new when running the
testsuite. Remove the keyresource check to always free spki.
2017-06-16 16:51:50 +01:00
Anatol Belski
b50fe893a7 Merge branch 'PHP-7.1' 2017-06-09 23:48:25 +02:00
Anatol Belski
0fa40b0546 group the change for bug #74720 2017-06-09 23:47:15 +02:00
Anatol Belski
587b800811 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74720 pkcs7_en/decrypt does not work if \x1a is used in
2017-06-09 17:37:42 +02:00
Anatol Belski
cbe73b3cfe Fixed bug #74720 pkcs7_en/decrypt does not work if \x1a is used in
content
2017-06-09 17:35:37 +02:00
Jakub Zelenka
8baf12b161 Merge branch 'PHP-7.1' 2017-06-04 18:22:02 +01:00
Jakub Zelenka
ff93f74f63 Merge branch 'PHP-7.0' into PHP-7.1 2017-06-04 18:11:49 +01:00
Jakub Zelenka
3704947696 Replace ASN1_STRING_data with ASN1_STRING_get0_data
This is a slightly modified version of the patch from Jelle van der Waa
( @jelly ) so full credit to him.
2017-06-04 18:08:51 +01:00
Nikita Popov
c28406f611 Merge branch 'PHP-7.1' 2017-06-02 23:53:00 +02:00
Jelle van der Waa
c742abb3ce openssl_pkcs12_read: add missing BIO_free
When filling the extracerts array with certificates bio_out is created
but not free'd leading to a small memory leak of 224 bytes (reported by
valgrind).
2017-06-02 23:52:43 +02:00
Anatol Belski
f8f8f24024 Merge branch 'PHP-7.1'
* PHP-7.1:
  follow up fix on bug #74022
2017-05-18 12:10:17 +02:00
Anatol Belski
26f217bf40 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  follow up fix on bug #74022
2017-05-18 12:07:09 +02:00
Anatol Belski
464c1639ae follow up fix on bug #74022 2017-05-18 12:03:13 +02:00
Jakub Zelenka
dccf487b2d Merge branch 'PHP-7.1' 2017-04-30 19:47:23 +01:00
Jakub Zelenka
6028fe511e Fix bug #73808 (iv length warning too restrictive for aes-128-ccm) 2017-04-30 19:46:27 +01:00
Jakub Zelenka
a0b9554f94 Fix possible memory leak in openssl_encrypt and openssl_decrypt 2017-04-27 15:44:26 +01:00
Jakub Zelenka
c0203c0ceb Do not add already added object to the internal OpenSSL table
This fixes OpenSSL 1.1 where adding object with OID that has been
already added causes an error - preventing of duplication.
2017-04-26 14:59:15 +01:00
Jakub Zelenka
2e727b9be1 Merge branch 'PHP-7.1' 2017-04-24 17:14:22 +01:00
Jakub Zelenka
7260f65c62 Merge branch 'PHP-7.0' into PHP-7.1 2017-04-24 17:12:55 +01:00
Jakub Zelenka
9fa347997a Fix bug #73833 (null character not allowed in openssl_pkey_get_private) 2017-04-24 17:11:36 +01:00
Jakub Zelenka
488324e315 Merge branch 'PHP-7.1' 2017-04-23 20:33:48 +01:00
Jakub Zelenka
ba83b18ce3 Merge branch 'PHP-7.0' into PHP-7.1 2017-04-23 20:31:24 +01:00
Jakub Zelenka
366b1640d0 Fix bug #73711 (Segfault in openssl_pkey_new when generating DSA or DH key) 2017-04-23 20:30:14 +01:00
Xinchen Hui
6bd8ed4dde Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #74402 (segfault on random_bytes, bin2hex, openssl_seal)
2017-04-10 19:03:38 +08:00
Xinchen Hui
3431132f18 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74402 (segfault on random_bytes, bin2hex, openssl_seal)
2017-04-10 19:03:09 +08:00
Xinchen Hui
42e576ace2 Fixed bug #74402 (segfault on random_bytes, bin2hex, openssl_seal) 2017-04-10 19:02:50 +08:00
Jakub Zelenka
cdc33251d2 Add OpenSSL 1.1.0 support to PHP 7.0 2017-04-07 19:21:33 +01:00
Nikita Popov
8aa419c91c Merge branch 'PHP-7.1' 2017-04-02 01:08:42 +02:00
Nikita Popov
32dcc1eef0 Merge branch 'PHP-7.0' into PHP-7.1 2017-04-02 01:08:24 +02:00
Moritz Fain
46d286574b Fixed bug #74341
Added support for ASN.1 UTCTime without seconds part (being 11 characters
long instead of 13).

Additionally, fixed incorrect handling of DST on systems without gmtoff.
2017-04-02 01:04:32 +02:00
Nikita Popov
efefb5276b Merge branch 'PHP-7.1' 2017-02-17 21:23:31 +01:00
andrewnester
15b8b124ae Fixed #74099 - Memory leak with openssl_encrypt() 2017-02-17 21:23:16 +01:00
Anatol Belski
2bff68a2f0 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #74022 PHP Fast CGI crashes when reading from a pfx file.
2017-02-02 13:07:48 +01:00
Anatol Belski
9b9080e85d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #74022 PHP Fast CGI crashes when reading from a pfx file.
2017-02-02 13:06:31 +01:00
Anatol Belski
6fc0ae638a Fixed #74022 PHP Fast CGI crashes when reading from a pfx file. 2017-02-02 12:48:12 +01:00
Jakub Zelenka
4a72d340a3 Merge branch 'PHP-7.1' 2017-01-25 19:56:19 +00:00
Jakub Zelenka
519b0dc886 Fix bug #73978 (openssl_decrypt triggers bug in PDO) 2017-01-25 19:55:05 +00:00
Leigh
2a9ee3c6f6 Merge branch 'PHP-7.1' 2017-01-18 15:04:19 +00:00
Leigh
85589ca660 Add php_openssl_store_errors to bailouts 2017-01-18 15:02:52 +00:00
Leigh
9c5a1c8ae9 Merge branch 'PHP-7.1' 2017-01-18 14:48:36 +00:00
Leigh
d2f07edf71 Merge branch 'PHP-7.0' into PHP-7.1 2017-01-18 14:47:49 +00:00
Leigh
e7e96fe2e0 Change free to OPENSSL_free 2017-01-18 14:45:41 +00:00
Joe Watkins
a1fd706d7d
Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove more TSRMLS_CC macros
2017-01-18 10:00:26 +00:00