Commit Graph

1353 Commits

Author SHA1 Message Date
Nikita Popov
78132cc424 Merge branch 'PHP-7.1' 2016-12-29 22:07:03 +01:00
Nikita Popov
2497ae031b Don't check for precise length in ecc.phpt
Again, this can be off by one.
2016-12-29 22:05:38 +01:00
Nikita Popov
30029d137f Merge branch 'PHP-7.1' 2016-12-29 21:00:34 +01:00
Nikita Popov
7746ed9d5f Merge branch 'PHP-7.0' into PHP-7.1 2016-12-29 21:00:14 +01:00
Nikita Popov
78675ebd9a Fix flaky openssl_pkey_new test
Public key size may vary by one bit... switch to using %d for
key sizes.
2016-12-29 20:59:28 +01:00
Bob Weinand
1f474fddbb Merge branch 'PHP-7.1'
Also inline alpn_ctx in openssl_netstream_data (no need for the extra allocation there)
2016-12-22 23:40:24 +01:00
Bob Weinand
7b133e074c Merge branch 'PHP-7.0' into PHP-7.1 2016-12-22 23:34:51 +01:00
Bob Weinand
ac1372d811 Fix alpn_ctx leaking in openssl 2016-12-22 23:34:07 +01:00
Anatol Belski
e1ef67625a Merge branch 'PHP-7.1'
* PHP-7.1:
  extend skip section
2016-12-14 19:57:44 +01:00
Anatol Belski
382ec5cf9e Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  extend skip section
2016-12-14 19:56:19 +01:00
Anatol Belski
5136048064 extend skip section
The day light offset is calculated based on the system TZ, so with
an unsuitable one there's no way to workaround the false positives.
2016-12-14 19:53:55 +01:00
Anatol Belski
89c61768f7 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix ident
2016-12-04 21:00:34 +01:00
Anatol Belski
69c3859368 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix ident
2016-12-04 20:59:56 +01:00
Anatol Belski
69fbc751ff fix ident 2016-12-04 20:59:12 +01:00
Anatol Belski
e72f6f0b65 Merge branch 'PHP-7.1'
* PHP-7.1:
  enforce the test ini usage for the child process
  Fix session upgrade documentation
2016-12-04 14:03:17 +01:00
Anatol Belski
dfd776b326 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  enforce the test ini usage for the child process
2016-12-04 14:02:37 +01:00
Anatol Belski
10a2ceef3b enforce the test ini usage for the child process 2016-12-04 14:01:40 +01: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
Matteo Beccati
fa7dca5a78 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix occasionaly failing test
2016-11-27 10:21:05 +01:00
Matteo Beccati
461add8adf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix occasionaly failing test
2016-11-27 10:20:50 +01:00
Matteo Beccati
54c04befc2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix occasionaly failing test
2016-11-27 10:20:38 +01:00
Matteo Beccati
2a80758fd5 Fix occasionaly failing test 2016-11-27 10:20:13 +01:00
Nikita Popov
45f7b2bcc8 Fix CRLF line-endings in tests
Also fix a single instance of CRLF in ibase_query.c.
2016-11-20 22:31:24 +01: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
Anatol Belski
271ed78a31 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix test portability
2016-11-18 22:11:41 +01:00
Anatol Belski
c7d0571ef4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test portability
2016-11-18 22:11:25 +01:00
Anatol Belski
48191010d5 fix test portability 2016-11-18 22:10:41 +01: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
493b2bff02 Fix bug #72776 (Invalid parameter in memcpy function trough openssl_pbkdf2) 2016-11-06 20:40:51 +00: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
Joe Watkins
d6fb5a1f1e Merge branch 'pull-request/1814' 2016-10-17 17:02:13 +01:00
Joe Watkins
522e4f1174 Merge branch 'pull-request/1814' 2016-10-17 17:01:10 +01:00
Joe Watkins
068f6bf938 Merge branch 'pull-request/1814' 2016-10-17 16:50:53 +01:00
Kalle Sommer Nielsen
ba76edcc7c Remove this old and long gone deprecated makefile. Netware was discontinued over 7 years ago and it is safe to say that no one is really maintaining support in php-src anyway for it 2016-10-16 08:52:39 +02:00
Kalle Sommer Nielsen
e63c864609 Fix build, decls first 2016-10-16 06:36:54 +02:00
Anatol Belski
20b63996c0 fix test
(cherry picked from commit 57354e0313)
2016-10-14 02:01:53 +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
Anatol Belski
57354e0313 fix test 2016-10-13 10:08:23 +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
Stanislav Malyshev
85a22a0af0 Fix bug #73276 - crash in openssl_random_pseudo_bytes function 2016-10-11 13:37:47 -07:00
Stanislav Malyshev
8822f7c9f0 fix bug #73275 - crash in openssl_encrypt function 2016-10-11 13:19:20 -07:00
Jakub Zelenka
539463395c Merge branch 'PHP-7.1' 2016-09-13 18:28:56 +01:00
Jakub Zelenka
1b1b7f8809 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-13 18:27:55 +01:00
Jakub Zelenka
3a739c9f9f Merge branch 'PHP-5.6' into PHP-7.0 2016-09-13 18:19:20 +01:00
Jakub Zelenka
05baa92727 Fix bug #73072 (Invalid path SNI_server_certs causes segfault) 2016-09-13 18:15:34 +01:00
Christoph M. Becker
fcc6f2df59 Merge branch 'PHP-7.1' 2016-09-06 14:15:05 +02:00
Christoph M. Becker
727b422ad9 Fix #72948: Uncatchable "Catchable" fatal error for class to string conversions
E_RECOVERABLE errors are reported as "Catchable fatal error". This is
misleading, because they actually can't be caught via try-catch statements.
Therefore we change the wording to "Recoverable fatal error" as suggested by
Nikita.
2016-09-03 13:05:37 +02:00
Jakub Zelenka
745bf979cd Merge branch 'PHP-7.1' 2016-08-21 20:29:55 +01:00
Jakub Zelenka
21c72827c7 Do not expect error 0407006A in openssl_private_(en|de)crypt
It makes the test work with OpenSSL 1.1
2016-08-21 20:29:03 +01: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
Jakub Zelenka
dc6ea028b5 Fix indent in opnenssl_decrypt tests 2016-07-24 13:40:54 +01:00
Mark Jones
e63ceacfca Remove unused DEFAULT_KEY_LENGTH define 2016-07-23 16:04:55 +02:00
Nikita Popov
40b312d4c2 Use OPENSSL_RAW_DATA in raw data decryption tests 2016-07-22 18:30:30 +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
Lauri Kenttä
76f6f3583c Fix test: Use valid base64 even for invalid OpenSSL data 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
d8580cb286 Use always non const SSL cipher version string 2016-07-19 20:01:20 +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
Jakub Zelenka
2ecce94756 Use opaque RSA, DSA and DH 2016-07-17 20:24:34 +01:00
Jakub Zelenka
329f74a11d Add missing creating of md_ctx in openssl_digest 2016-07-17 20:01:37 +01:00
Jakub Zelenka
444adff0b2 Change sign method from ecdsa-with-SHA1 to SHA1
There are no message digest methods for public key
(e.g. ecdsa-with-SHA1, dsa*, DSA*) MD methods in OpenSSL 1.1.
2016-07-17 17:46:14 +01:00
Jakub Zelenka
e5780c8cd0 Add missing break in php_openssl_is_private_key 2016-07-17 17:46:14 +01:00
Jakub Zelenka
1008385959 Use SHA1 instead of DSS1 in test for bug #41033 2016-07-17 17:46:14 +01:00
Jakub Zelenka
069d20a33b Hide setting server ECDH curve for OpenSSL 1.1
It seems to be done automatically
2016-07-17 17:46:14 +01:00
Jakub Zelenka
1123c85d79 Do not use tmp_rsa_cb for OpenSSL 1.1
The SSL_CTX_set_tmp_rsa_callback has been removed
2016-07-17 17:46:14 +01:00
Jakub Zelenka
0afa0b1f83 The DSS1 is not available in OpenSSL 1.1 2016-07-17 17:46:13 +01:00
Jakub Zelenka
d73735a750 Move and use opaque pkey in openssl_dh_compute_key 2016-07-17 17:43:34 +01:00
Jakub Zelenka
1a4e910e8d Use opaque pkey in openssl_pkey_get_details 2016-07-17 17:43:34 +01:00
Jakub Zelenka
f08660bb58 Use EVP_PKEY_base_id where possible 2016-07-17 17:33:42 +01:00
Jakub Zelenka
f1de72293e Use opaque EVP_PKEY in php_openssl_is_private_key 2016-07-17 17:33:42 +01:00
Jakub Zelenka
0598a8da2b Do not use X509 props directly in openssl_x509_parse 2016-07-17 17:33:42 +01:00
Jakub Zelenka
e138b51dad Do not use X509_EXTENSION data directly as it is opaque 2016-07-17 17:33:42 +01:00
Jakub Zelenka
84a291d4da Wrap pkey id and rsa getters 2016-07-17 17:33:42 +01:00
Jakub Zelenka
fd9142a647 Use opaque md ctx in openssl_sign and openssl_verify 2016-07-17 17:33:42 +01:00
Jakub Zelenka
b8164673eb Use opaque cipher ctx in openssl_seal and openssl_open 2016-07-17 17:33:42 +01:00
Jakub Zelenka
3a8531e767 Use opaque EVP_MD_CTX in openssl_digest 2016-07-17 17:33:41 +01:00
Jakub Zelenka
5f569cc03e Bump minimal OpenSSL version to 1.0.1 2016-07-17 17:21:07 +01:00
Remi Collet
d30b6a85b2 force SSL_OP_NO_SSLv2 2016-07-17 16:41:47 +01:00
Remi Collet
642aee1deb Cleanup all SSLv2 code, whatever OpenSSL version is 2016-07-17 16:41:47 +01:00
Jakub Zelenka
9fabb7cac7 Remove openssl test 029 as it is incomplete 2016-06-29 20:49:14 +01:00
Dmitry Stogov
f5dbba0d54 Revert "Skip new OpenSSL ECC tests on 32bit"
This reverts commit 0a4f89bc29.
2016-06-29 11:43:31 +03:00
Jakub Zelenka
0a4f89bc29 Skip new OpenSSL ECC tests on 32bit
There has been reported that they fail on 32bit so
they will be skipped till the issue is investigated.
2016-06-28 20:39:31 +01:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Jakub Zelenka
e8a09ddc07 Improve openssl ecc keypair support implementation 2016-06-26 16:55:51 +01:00
Dominic Luechinger
9688138d38 Adds initial support to generate and work with ECC public key pair
New features:
- openssl_get_curve_names => list ECC curve names
- generate a ECC public key pair
- generate an CSR with an ECC key
- export x,y,d params of ECC public/private key

Thanks to @bukka for the review and feedback
2016-06-26 16:15:25 +01:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Jakub Zelenka
af79a58507 Merge branch 'openssl_error_store' into openssl_aead 2016-06-19 17:36:57 +01:00
Jakub Zelenka
d22d71b6c5 Remove test for incorrect fix of bug #69882
The fix just cleared the errors without storing which was wrong
2016-06-19 17:25:30 +01:00
Jakub Zelenka
e63a8540a6 Merge branch 'openssl_error_store' into openssl_aead 2016-06-19 17:05:48 +01:00
Jakub Zelenka
53071e6470 Remove expected openssl errors that are not needed anymore 2016-06-19 16:46:27 +01:00
Jakub Zelenka
c2b90805e8 Merge branch 'master' into openssl_error_store 2016-06-19 16:20:02 +01:00
Anatol Belski
d6b649f6da fix test portability 2016-06-17 17:03:13 +02:00
Jakub Zelenka
e2904ffa65 Merge branch 'PHP-7.0' 2016-06-16 20:12:50 +01:00
Jakub Zelenka
307e546e1a Merge branch 'PHP-5.6' into PHP-7.0 2016-06-16 20:11:54 +01:00
Jakub Zelenka
0c34f53c93 Fix incorrect error suppressing in openssl_error_string test 2016-06-16 20:11:02 +01:00
Jakub Zelenka
84948e6382 Fix occasionally failing OpenSSL DH bug test
The test was failing when first byte was 0
2016-06-16 20:09:17 +01:00
Jakub Zelenka
b44cf1a854 Merge branch 'PHP-7.0' into openssl_error_store 2016-06-12 18:56:55 +01:00
Jakub Zelenka
e933da9028 Merge branch 'PHP-7.0' 2016-06-12 18:40:24 +01:00
Jakub Zelenka
a2f4c32eb1 Merge branch 'PHP-5.6' into PHP-7.0 2016-06-12 18:39:32 +01:00
Jakub Zelenka
0e2447cd11 Fix bug #71915 (openssl_random_pseudo_bytes is not fork-safe)
Add time to the entropy before using RAND_bytes
2016-06-12 18:14:21 +01:00
Jakub Zelenka
54310d95f9 Fix bug #72336 (openssl_pkey_new does not fail for invalid DSA params) 2016-06-12 18:14:21 +01:00
Jakub Zelenka
4056edd20d Update openssl_error_string to run and be more forgiving 2016-06-12 18:14:21 +01:00
Jakub Zelenka
296aa365ca Merge branch 'PHP-7.0' 2016-06-08 18:37:32 +01:00
Jakub Zelenka
84dce33b04 Merge branch 'PHP-5.6' into PHP-7.0 2016-06-08 18:36:36 +01:00
Jakub Zelenka
05033c9ebd Fix bug #72140 (segfault after calling ERR_free_strings()) 2016-06-08 18:21:39 +01:00
Anatol Belski
edf769c023 Merge branch 'PHP-7.0'
* PHP-7.0:
  fix typo
2016-06-06 08:58:40 +02:00
Anatol Belski
174c3371bd Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix typo
2016-06-06 08:58:08 +02:00
Anatol Belski
eaef8f6db2 fix typo 2016-06-06 08:56:40 +02:00
Anatol Belski
db68121da8 Merge branch 'PHP-7.0'
* PHP-7.0:
  fix broken skipif and add xfail for now
2016-06-06 08:23:22 +02:00
Anatol Belski
075c75873e Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix broken skipif and add xfail for now
2016-06-06 08:21:39 +02:00
Anatol Belski
1b2afd478b fix broken skipif and add xfail for now 2016-06-06 08:20:01 +02:00
Jakub Zelenka
da83e4295a Merge branch 'PHP-7.0' 2016-06-05 17:31:05 +01:00
Jakub Zelenka
1f7535234e Merge branch 'PHP-5.6' into PHP-7.0 2016-06-05 17:30:03 +01:00
Jakub Zelenka
d4615d1118 Add new test for openssl_pkey_new 2016-06-05 17:27:47 +01:00
Jakub Zelenka
497fe33d6f Add test for openssl_error_string
This test is important for making sure that the error strings
from OpenSSL works as expected and we can safely add a fix
for storing the strings that is prepared.
2016-06-05 17:23:05 +01:00
Jakub Zelenka
5e9f387175 Remove openssl_x509_parse for OpenSSL 0.9.x
The test is unstable and it actually fails with latest 0.9.8
2016-06-05 16:28:50 +01:00
Anatol Belski
80f91fd9d5 Merge branch 'PHP-7.0'
* PHP-7.0:
  Re-fix #72165
  Revert "Fixed bug #72165 Null pointer dereference - openssl_csr_new"
2016-05-06 09:33:22 +02:00
Anatol Belski
5afba67bfe Re-fix #72165
Reverted previous wrong patch, throw warning for numeric keys.
Numeric field names are not supported, see "distinguished name"
section here https://www.openssl.org/docs/manmaster/apps/req.html
2016-05-06 09:30:41 +02:00
Anatol Belski
dd5479ea4c Revert "Fixed bug #72165 Null pointer dereference - openssl_csr_new"
This reverts commit 7277c85765.
2016-05-06 09:19:04 +02:00
Anatol Belski
20ae634bf0 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72165 Null pointer dereference - openssl_csr_new
2016-05-06 09:02:14 +02:00
Anatol Belski
7277c85765 Fixed bug #72165 Null pointer dereference - openssl_csr_new 2016-05-06 09:01:27 +02:00
Joe Watkins
66fc5a3436 Implement #51879 stream context socket option tcp_nodelay 2016-04-29 12:11:58 +01:00
Jakub Zelenka
6ac8bc4ecb Merge branch 'openssl_error_store' of github.com:bukka/php-src into openssl_error_store 2016-04-03 19:56:15 +01:00
Jakub Zelenka
df85331220 Correctly store OpenSSL erorrs for encrypt_key 2016-04-03 19:54:39 +01:00
Jakub Zelenka
79dd71b151 Store OpenSSL errors from CONF_get_string in SET_OPTIONAL_STRING_ARG 2016-04-03 19:51:22 +01:00
marcosptf
5cd9c3bd71 test to function openssl_free_key($loaded_key);
was added a new test to openssl module to coverage openssl_free_key($loaded_key); function
2016-03-13 10:53:34 -03:00
Jakub Zelenka
7a4cc73641 Merge branch 'openssl_error_store' into openssl_aead_with_error_store 2016-02-29 19:34:39 +00:00
Jakub Zelenka
70141093a7 Merge branch 'master' into openssl_aead 2016-02-29 19:31:20 +00:00
Jakub Zelenka
80015ba741 Merge branch 'PHP-7.0' into openssl_error_store 2016-02-29 19:28:40 +00:00
Stanislav Malyshev
9afb29aa68 Remove TSRMLS_* from code, they are not used anymore 2016-02-17 22:44:05 -08:00
Anatol Belski
343307000e yet two test fixes in openssl in 5.6 2016-02-16 08:28:10 +01:00
Anatol Belski
08086d40a5 Merge branch 'PHP-7.0'
* PHP-7.0:
  improve test
2016-02-16 08:06:57 +01:00
Anatol Belski
84014cf733 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  improve test
2016-02-16 08:06:38 +01:00
Anatol Belski
974dea5e88 improve test 2016-02-16 08:05:16 +01:00
Jakub Zelenka
4ea2a0fd60 Store errors in openssl_random_pseudo_bytes 2016-02-14 19:25:14 +00:00
Nikita Popov
2d605e5f24 Merge branch 'PHP-7.0' 2016-02-14 14:47:42 +01:00
Nikita Popov
c9357f82d3 Format string fixes
Conflicts:
	ext/pgsql/pgsql.c
2016-02-14 14:45:53 +01:00
Jakub Zelenka
664d693513 Store errors in openssl_dh_compute_key 2016-02-08 19:35:47 +00:00
Jakub Zelenka
9b094be5f7 Store errors in openssl_encrypt and openssl_decrypt 2016-02-07 16:40:21 +00:00
Jakub Zelenka
34eb6b53cc Store errors in openssl_digest 2016-02-05 15:32:19 +00:00
Rob Thomas
2854f3292d Fix patch to work against PHP7
This also updates the testcases so they now return correct data
with the extra return value.
2016-02-05 10:19:02 +10:00
Rob Thomas
73bae6b065 Add 'serialNumberHex' variable to openssl_x509_parse
Currently, openssl_x509_parse returns an integer. This can be
unexpected, as the common way of handling serial numbers is with
a hex string.

This is compounded as  php's dechex() function cannot handle >32
bit numbers which will leave people trying to handle large serial
numbers frustrated.

By adding this extra return variable to openssl_x509_parse, the
consumer of the variable is certain that the serialNumberHex that
is returned is the exact Hex Serial number as OpenSSL returns
everywhere else.
2016-02-05 08:21:47 +10:00
Jakub Zelenka
2a9dd980bf Merge branch 'PHP-7.0' 2016-02-04 16:57:41 +00:00
Jakub Zelenka
1ff88d3945 Merge branch 'PHP-5.6' into PHP-7.0 2016-02-04 16:54:44 +00:00
Jakub Zelenka
feab5e6fa0 Split and clean up OpenSSL X509 tests 2016-02-04 16:51:36 +00:00
Jakub Zelenka
899d2b2126 Store errors in openssl_seal and openssl_open 2016-02-04 12:30:53 +00:00
Jakub Zelenka
95a48213a0 Merge branch 'PHP-7.0' into openssl_error_store 2016-02-03 16:30:19 +00:00
Jakub Zelenka
fd6f32f667 Merge branch 'PHP-7.0' 2016-02-03 16:23:37 +00:00
Jakub Zelenka
cdf99ffc69 Merge branch 'PHP-5.6' into PHP-7.0 2016-02-03 16:22:39 +00:00
Jakub Zelenka
1f3906c1ce Rename and clean up OpenSSL tests 2016-02-03 16:20:27 +00:00
Jakub Zelenka
ff1c97f0aa Store errors in openssl_sign and openssl_verify 2016-02-03 13:55:37 +00:00
Jakub Zelenka
c26b87b8ac Rewrite openssl_error_string to use stored errors 2016-02-02 16:26:03 +00:00
Anatol Belski
99d9654f4b Merge branch 'PHP-7.0'
* PHP-7.0:
  fix directory separator in test
2016-02-02 09:52:26 +01:00
Anatol Belski
1c2d45d2d1 fix directory separator in test 2016-02-02 09:52:07 +01:00
Stanislav Malyshev
ea35de6e31 Merge branch 'PHP-7.0'
* PHP-7.0: (35 commits)
  fix tests
  update NEWS
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71475: openssl_seal() uninitialized memory usage
  Fixed bug #71488: Stack overflow when decompressing tar archives
  fix tests
  fix wrong gc sequence
  revert the API string as well
  update NEWS
  Revert "Fix #70720"
  sync NEWS
  reset ext/session to the state of 7.0.2
  update NEWS
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  ...
2016-02-01 20:46:06 -08:00
Stanislav Malyshev
c631f1ee2b Merge branch 'PHP-7.0.3' into PHP-7.0
* PHP-7.0.3: (35 commits)
  fix tests
  update NEWS
  fix tests
  fix NEWS
  Update NEWS
  update NEWS
  Fixed bug #71475: openssl_seal() uninitialized memory usage
  Fixed bug #71488: Stack overflow when decompressing tar archives
  fix tests
  fix wrong gc sequence
  revert the API string as well
  update NEWS
  Revert "Fix #70720"
  sync NEWS
  reset ext/session to the state of 7.0.2
  update NEWS
  update NEWS
  add missing headers for SIZE_MAX
  backport the escapeshell* functions hardening branch
  add tests
  ...

Conflicts:
	configure.in
	ext/session/tests/bug69111.phpt
	main/php_version.h
2016-02-01 20:45:49 -08:00
Jakub Zelenka
ceddf003a7 Store errors in openssl_(public|private)_(en|de)crypt 2016-02-01 18:42:42 +00:00
Stanislav Malyshev
33b1fbbb5c Fixed bug #71475: openssl_seal() uninitialized memory usage 2016-01-31 20:18:46 -08:00
Jakub Zelenka
678300aca6 Merge branch 'PHP-7.0' 2016-01-31 18:14:37 +00:00
Jakub Zelenka
265ccef39b Rename private.key to private_rsa_1024.key in new openssl_seal test 2016-01-31 18:13:37 +00:00
Jakub Zelenka
7295ffdff6 Merge branch 'PHP-7.0' 2016-01-31 14:41:08 +00:00
Jakub Zelenka
d8d20151c3 Merge branch 'PHP-5.6' into PHP-7.0 2016-01-31 14:40:20 +00:00
Jakub Zelenka
ef356912b3 Rewrite OpenSSL SPKI tests to speed them up
Also fix some CS issue and naming
2016-01-31 14:28:13 +00:00
Jakub Zelenka
e93ab05489 Add private RSA keys with 2048 and 4096 bit long modulus 2016-01-31 13:57:00 +00:00
Jakub Zelenka
148d013323 Rename private.key to private_rsa_1024.key 2016-01-31 13:54:16 +00:00
Jakub Zelenka
32d8cea840 Store errors in OpenSSL PKCS7 functions 2016-01-31 12:36:51 +00:00
Jakub Zelenka
8a251a8ec8 Store errors in openssl_pbkdf2 2016-01-31 11:55:36 +00:00
Jakub Zelenka
62b489287e Store errors in OpenSSL PKEY functions 2016-01-29 15:01:12 +00:00
Jakub Zelenka
538fbcdb7a Store errors in OpenSSL CSR functions 2016-01-29 13:55:24 +00:00
Jakub Zelenka
9d640c0001 Store errors in OpenSSL PKCS12 functions 2016-01-27 15:38:52 +00:00
Jakub Zelenka
f9f9ef2c2e Store errors in openssl_x509_checkpurpose 2016-01-26 16:15:49 +00:00
Xinchen Hui
c58ad955a9 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71443 (Segfault using built-in webserver with intl using symfony)
  Fix memory leak with not freeing OpenSSL errors
  check for NULL and avoid crashes
  Update libmagic.patch for PHP-5.6
  Fixed bug #7143	(finfo throws notice for specific python file)
2016-01-26 15:57:49 +08:00
Jakub Zelenka
67c1921e2b Merge branch 'PHP-5.6' into PHP-7.0 2016-01-25 17:19:18 +00:00
Jakub Zelenka
a63d0f55da Fix memory leak with not freeing OpenSSL errors 2016-01-25 16:50:16 +00:00
Jakub Zelenka
0e2a5cdc1a Store main errors in openssl_x509_parse 2016-01-22 16:43:23 +00:00
Jakub Zelenka
116d64ff58 Store errors in openssl_x509_fingerprint 2016-01-21 16:41:27 +00:00
Jakub Zelenka
555126e90b Store errors in openssl_x509_export 2016-01-20 20:31:09 +00:00
Jakub Zelenka
63f8ef6ee1 Store errors in OpenSSL SPKI functions 2016-01-19 19:43:48 +00:00
Jakub Zelenka
b5c990c39b Store errors for some OpenSSL RAND handling 2016-01-10 18:28:01 +00:00
Jakub Zelenka
fb3a7e0ef4 Add error storing to the OpenSSL CONF part 2016-01-10 17:38:49 +00:00
Jakub Zelenka
d5a148e237 Use and fix storing errors in openssl_x509_export_to_file
Also use persistent memory to prevent segfualt
2016-01-09 18:45:02 +00:00
Jakub Zelenka
19d40fc2b0 Implement logic for OpenSSL error storing 2016-01-09 17:45:08 +00:00
Jakub Zelenka
e453af3851 Warn about passing tag for non AEAD modes 2016-01-09 17:25:53 +00:00
Jakub Zelenka
1d111320b9 Add initial almost empty php_openssl_store_errors 2016-01-08 14:57:31 +00:00
Jakub Zelenka
e00ba47d40 Add global data for storing OpenSSL errors 2016-01-07 16:38:24 +00:00
Jakub Zelenka
ae0ce19fa8 Merge branch 'master' into openssl_aead 2016-01-06 14:43:07 +00:00
Jakub Zelenka
55abb5d395 Fix and test OpenSSL CCM decryption 2016-01-05 14:19:00 +00:00
Jakub Zelenka
9b95dd5e37 Merge branch 'PHP-7.0' 2016-01-04 16:53:30 +00:00
Jakub Zelenka
0ea63cb2a8 Fix small CS label issue in openssl.c 2016-01-04 16:52:52 +00:00
Dominic Luechinger
e4bdf51f0a Replaced whitespaces with tabs and fixed aligments 2016-01-04 16:46:32 +00:00
Jakub Zelenka
5897256d04 Fix and test OpenSSL CCM encryption 2016-01-04 14:07:19 +00:00
Jakub Zelenka
8daecc59eb Test error cases in openssl_decrypt for GCM mode 2016-01-03 17:25:59 +00:00
Jakub Zelenka
651e6b628b Comment out warning when cipher update fail
There has never been any warning for that
2016-01-03 17:24:06 +00:00
Jakub Zelenka
72381b09ea Fix arginfo for openssl_decrypt (tag is not ref) 2016-01-03 17:21:57 +00:00
Jakub Zelenka
a866503bca Test invalid auth tag length in encryption 2016-01-02 17:01:54 +00:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Jakub Zelenka
52ffdf9fc3 Test and fix encrypting empty IV for AEAD mode 2015-12-31 16:33:57 +00:00
Jakub Zelenka
74f2998212 Add an initial openssl decrypt GCM test 2015-12-30 18:18:05 +00:00
Jakub Zelenka
8070e04733 Add more aes-128-gcm test vectors 2015-12-29 18:54:22 +00:00
Jakub Zelenka
a00d1eccc7 Add an initial openssl encrypt GCM test 2015-12-28 19:16:05 +00:00
Jakub Zelenka
5e9540f77d Add AES CCM ciphers when linked with OpenSSL 1.0.1
These ciphers are not added by OpenSSL_add_all_algorithms in 1.0.1
2015-12-27 18:03:36 +00:00
Jakub Zelenka
213844de49 Fix EVP_EncryptFinal and EVP_DecryptFinal 2015-12-26 20:33:03 +00:00
Tom Van Looy
618b961124 Remove leftovers of TSRMLS in code 2015-12-25 11:13:39 +01:00
Jakub Zelenka
fc3575aaf1 Retrieve tag in AEAD cipher mode encryption 2015-12-13 19:05:19 +00:00
Jakub Zelenka
c54174255d Simplify AAD condition 2015-12-07 19:19:44 +00:00
Jakub Zelenka
da0c2a4b6b Implement AAD setting 2015-12-06 20:09:41 +00:00
Jakub Zelenka
32495cbfdd Add php_openssl_cipher_update to group enc and dec logic 2015-12-04 20:27:18 +00:00
Jakub Zelenka
e74368a8a1 Set AEAD tag or tag_len if supplied 2015-12-03 19:16:11 +00:00
Jakub Zelenka
c993151115 Add AEAD IV init 2015-12-01 19:34:12 +00:00
Jakub Zelenka
4b22c063bf Move password checkign to php_openssl_cipher_init 2015-11-15 19:11:24 +00:00
Jakub Zelenka
be57cafb56 Merge branch 'master' of git.php.net:php-src into openssl_aead 2015-11-15 19:10:34 +00:00
Jakub Zelenka
570cdc05d7 Merge branch 'PHP-5.6' into PHP-7.0 2015-11-09 18:23:29 +00:00
Jakub Zelenka
1a12403002 Remove SNI test that trigger request to sni.velox.ch
This has been requested by Kaspar Brand who provides
sni.velox.ch. That site is only for interactive
testing and not for unit/integration/regression testing.
Although this test is run only in special cases (when
SNI_TESTS is defined) it should still be removed.

Also this test is not reliable as it depends on external
resources.
2015-11-09 18:11:18 +00:00
Jakub Zelenka
dcabd9403a Move php_openssl_validate_iv to php_openssl_cipher_init and fix some issues 2015-11-08 18:03:17 +00:00
Jakub Zelenka
3ce5e46338 Change return value from php_openssl_validate_iv 2015-11-03 19:35:02 +00:00
Jakub Zelenka
2eb3e2c3ba Use php_openssl_cipher_init in openssl_decrypt 2015-11-02 21:39:38 +00:00
Jakub Zelenka
789ee143b2 Use php_openssl_cipher_init in openssl_encrypt 2015-11-01 13:30:42 +00:00
Jakub Zelenka
c09f3e399e Use correct type for tag_len 2015-11-01 13:19:52 +00:00
Jakub Zelenka
19e60a1f52 Merge branch 'master' into openssl_aead 2015-11-01 12:59:18 +00:00
Jakub Zelenka
e62db72111 Use standard title for new openssl tests 2015-10-29 19:11:57 +00:00
root
06c6b51e7d new tests to openssl module, don't covered yet. 2015-10-29 19:06:40 +00:00
Jakub Zelenka
6418786fc3 Merge branch 'master' of git.php.net:php-src into openssl_aead 2015-10-29 19:04:17 +00:00