Commit graph

861 commits

Author SHA1 Message Date
Thomas Punt
9977bdf9b3
Remove more TSRMLS_CC macros 2017-01-18 10:00:15 +00:00
Joe Watkins
c9c8a301fa
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix memleaks from #1755 and some pre-existing ones
2017-01-07 10:15:37 +00:00
Joe Watkins
5ae45ef993
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix memleaks from #1755 and some pre-existing ones
2017-01-07 10:15:15 +00:00
Leigh
21f287915c Remove superfluous variable reinit 2017-01-07 09:43:05 +00:00
Leigh
62e9e1fecd Some commentary, change free method 2017-01-06 15:49:15 +00:00
Leigh
9a0dac124e Conditionally free depending on how assignment happened 2017-01-06 15:24:37 +00:00
Leigh
053b966134 Fix memleaks from #1755 and some pre-existing ones 2017-01-06 14:58:54 +00:00
Joe Watkins
2d42423953
Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:43:59 +00:00
Joe Watkins
0884cffb67
Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:42:57 +00:00
Joe Watkins
7e3a8ef5e1
Merge branch 'pull-request/1755'
* pull-request/1755:
  Fix bug #71519 Add 'serialNumberHex' variable to openssl_x509_parse
2017-01-06 07:41:48 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Jakub Zelenka
42155c3631 Merge branch 'PHP-7.1' 2016-11-27 19:00:57 +00:00
Jakub Zelenka
0ebdf3625e Do not add extra timeval entropy when OpenSSL 1.1 used
It is already added by OpenSSL so it is not needed
2016-11-27 19:00:05 +00:00
Jakub Zelenka
202e95e18f Merge branch 'PHP-7.1' 2016-11-27 18:57:35 +00:00
Jakub Zelenka
0f4216298f Clean up and fix php_openssl_dh_pub_from_priv 2016-11-27 18:54:28 +00:00
Jakub Zelenka
b98357823a Merge branch 'PHP-7.1' 2016-11-20 20:08:34 +00:00
Jakub Zelenka
ce4869f038 Fix bug #73478 (openssl_pkey_new() generates wrong pub/priv keys with Diffie Hellman) 2016-11-20 20:06:39 +00:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Jakub Zelenka
a93d272549 Merge branch 'PHP-7.1' 2016-11-06 17:40:59 +00:00
Jakub Zelenka
e840071b76 Never return private part of the key from openssl_csr_get_public_key
This fixes ecc.phpt test when OpenSSL 1.1 linked.
2016-11-06 17:37:06 +00:00
Jakub Zelenka
17dc15b51e Merge branch 'PHP-7.1' 2016-10-30 19:13:21 +00:00
Jakub Zelenka
1a13809bae Define X509_get_signature_nid for LibreSSL
It should hopefully fix the LibreSSL build. Thanks to Alice Wonder!
2016-10-30 19:12:24 +00:00
Jakub Zelenka
a8f426d4e8 Merge branch 'PHP-7.1' 2016-10-30 19:02:46 +00:00
Jakub Zelenka
72659f9597 Fix EC_KEY memory leaks
It was caused by using of EVP_PKEY_get1_EC_KEY which increments an EC_KEY
reference. The fix it we simply use EVP_PKEY_get0_EC_KEY.
2016-10-30 18:58:11 +00:00
Jakub Zelenka
df73aa0e65 Merge branch 'PHP-7.1' 2016-10-23 19:56:29 +01:00
Jakub Zelenka
820bca8ca3 Try to fix LibreSSL build 2016-10-23 19:55:22 +01:00
Jakub Zelenka
eca30fd1b1 Merge branch 'PHP-7.1' 2016-10-23 19:40:48 +01:00
Jakub Zelenka
930ae4034e Drop useless checks for DH and RSA
If DH or RSA was disabled, the build would fail already as
it's used already elsewhere without checking the OPENSSL_NO_DH
or OPENSSL_NO_RSA defines.
2016-10-23 19:37:07 +01:00
Kalle Sommer Nielsen
e63c864609 Fix build, decls first 2016-10-16 06:36:54 +02:00
Stanislav Malyshev
177e6adca7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix outlen for openssl function
  Syncronize with 5.6 - __toString should return ""
  Fix potential overflows in php_pcre_replace_impl

(cherry picked from commit ff75665663)
2016-10-14 01:58:48 +02:00
Anatol Belski
7897e8cd6c followup with #73276 merge
(cherry picked from commit b135ba3fa9)
2016-10-14 01:43:02 +02:00
Stanislav Malyshev
fe789b3f7c Fix bug #73276 - crash in openssl_random_pseudo_bytes function
(cherry picked from commit 85a22a0af0)
(cherry picked from commit 7dc8b5e7ae)
2016-10-14 01:42:19 +02:00
Stanislav Malyshev
ff75665663 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix outlen for openssl function
  Syncronize with 5.6 - __toString should return ""
  Fix potential overflows in php_pcre_replace_impl
2016-10-12 23:26:15 -07:00
Stanislav Malyshev
cd8c9b0614 Fix outlen for openssl function
Even though datalen can't be over int, outlen can.
2016-10-12 23:19:07 -07:00
Anatol Belski
d103a41679 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  followup with #73276 merge
  fix test
  Fix bug #73276 - crash in openssl_random_pseudo_bytes function
  Fix bug #73293 - NULL pointer dereference in SimpleXMLElement::asXML()
  Fix for #73240 - Write out of bounds at number_format
  avoid strlen
  Bug #73218: add mitigation for ICU int overflow
  Add more locale length checks, due to ICU bugs.
  Fix bug #73150: missing NULL check in dom_document_save_html
  Clear FG(user_stream_current_filename) when bailing out
  set versions and release date
  sync NEWS
  Revert "Fixed bug #73067 (__debugInfo crashes when throwing an exception)"
  Fix for #73240 - Write out of bounds at number_format
  Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
  set versions
  Fix bug #73091 - Unserializing DateInterval object may lead to __toString invocation
2016-10-12 16:06:11 +02:00
Anatol Belski
b135ba3fa9 followup with #73276 merge 2016-10-12 16:03:35 +02:00
Stanislav Malyshev
7dc8b5e7ae Fix bug #73276 - crash in openssl_random_pseudo_bytes function
(cherry picked from commit 85a22a0af0)
2016-10-12 15:55:42 +02:00
Jakub Zelenka
f13fd9e72a Merge branch 'PHP-7.1' 2016-08-14 20:44:08 +01:00
Jakub Zelenka
427c8c809d Set DSA or DH key only if pub key supplied 2016-08-14 20:42:56 +01:00
Jakub Zelenka
fba632e6d0 Merge branch 'PHP-7.1' 2016-08-14 19:37:29 +01:00
Jakub Zelenka
c3c90abb17 Return false if tag is not supplied or cannot be retrieved in AEAD
It doesn't make sense to return just encoded string as it cannot be
used anyway (decryption without a tag will not work).
2016-08-14 19:34:03 +01:00
Jakub Zelenka
9ed2a70757 Merge branch 'PHP-7.1' 2016-08-03 20:07:57 +01:00
Jakub Zelenka
6822af2e73 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.
2016-08-03 20:01:41 +01:00
Mark Jones
e63ceacfca Remove unused DEFAULT_KEY_LENGTH define 2016-07-23 16:04:55 +02:00
Lauri Kenttä
f775199ac7 Require strict base64 in openssl_decode
Using invalid data in a security-related context makes no sense,
and there's even a test which depends on invalid base64 data failing,
even though it currently fails for the wrong reasons by sheer luck.
2016-07-22 18:03:55 +02:00
Jakub Zelenka
98ac90b7e2 Add missing X509_get_signature_nid for 1.0.1 2016-07-19 20:13:13 +01:00
Jakub Zelenka
ea35d309b9 Update authors of openssl.c 2016-07-17 20:48:20 +01:00
Jakub Zelenka
6c497ad2d2 Use opaque EVP_PKEY for new EC logic in openssl_pkey_new 2016-07-17 20:44:33 +01:00