Commit Graph

254 Commits

Author SHA1 Message Date
Pierre Joye
0f55627dee - MFB: #42222, truncate the _default to the buffer size (was 200 since day #1, we don't need dynamic alloc here) 2007-08-06 19:13:05 +00:00
Dmitry Stogov
a433f85ce1 Improved ext/openssl
. Added support for OpenSSL digest functions
  . Added support for OpenSSL cipher functions
  . Added access to internal values of DSA, RSA and DH keys
2007-08-06 08:43:43 +00:00
Dmitry Stogov
35cdce9e02 Unicode support
improved openssl_x509_parse() extensions support
2007-07-11 12:10:28 +00:00
Dmitry Stogov
27737a9c45 Fixed memory leak 2007-07-11 07:35:53 +00:00
Dmitry Stogov
f54b1377a2 Fixed crash on non-string passphrase and unicode support 2007-07-11 07:27:20 +00:00
Dmitry Stogov
a84dbc7cb6 Fixed bug #41353 2007-07-10 07:57:15 +00:00
Pierre Joye
8a4c51e17a - MFB: Fixed a memory leak inside load_all_certs_file() 2007-06-20 05:27:38 +00:00
Antony Dovgal
23f8cc74e6 fix test names 2007-05-30 15:40:17 +00:00
Ilia Alshanetsky
3821f0c45a MFB 2007-05-28 23:33:13 +00:00
Antony Dovgal
ddbd78f523 fix test names 2007-05-28 20:03:35 +00:00
Pierre Joye
2a10caedcf - MFB: enable DSA key if HAVE_DSA_DEFAULT_METHOD is set 2007-05-28 13:53:54 +00:00
Pierre Joye
d476e987a7 - skip if openssl is too old
- MFB test bug41353.phpt
2007-05-28 13:48:36 +00:00
Pierre Joye
22231d14d3 - MFH: add HAVE_DSA_DEFAULT_METHOD 2007-05-28 13:46:24 +00:00
Antony Dovgal
81560e2de5 fix tests 2007-05-27 19:13:29 +00:00
Antony Dovgal
8ffc3078d8 MFB: fix #41236 (Regression in timeout handling of non-blocking SSL connections during reads and writes).
Everybody please calm down, we can always fix such issues without starting a war..
2007-05-27 19:13:11 +00:00
Pierre Joye
0f7a838d0b - #41423, PHP assumes wrongly that certain ciphers are enabled in OpenSSL 2007-05-19 22:04:27 +00:00
Rob Richards
fcff9a5dd3 fix win32 build 2007-04-05 18:09:48 +00:00
Antony Dovgal
5273aea4d2 fix build & test
improve coding style
2007-04-05 07:24:21 +00:00
Pierre Joye
5a0cf57fb7 - MFB:
- implement #39867, PKCS#12 support
 - Fix possible multibyte issues issue in the add_assoc function
 - add test for openssl_csr_get_subject
2007-04-04 21:39:01 +00:00
Antony Dovgal
6285e0d9d1 fix leak on error 2007-04-04 10:44:49 +00:00
Antony Dovgal
fe2dbd92bc fix #40750 (openssl stream wrapper ignores default_stream_timeout) 2007-03-14 19:21:23 +00:00
Marcus Boerger
20a40063c5 - avoid sprintf 2007-02-24 16:25:58 +00:00
Rob Richards
e053dcc066 fix accessing public key from x509 resource
add test
fix test under win32
2007-01-19 19:23:20 +00:00
Sebastian Bergmann
3717df72ae Bump year. 2007-01-01 09:29:37 +00:00
Rob Richards
3d73c5da0d MFB: Fix win32 build 2006-12-06 13:20:17 +00:00
Ilia Alshanetsky
bc07f14f7a MFB: Fixed bug #39571 (timeout ssl:// connections). 2006-12-05 01:39:21 +00:00
Pierre Joye
95b56a6eda - add signature_algo to the function signature 2006-10-21 00:43:00 +00:00
Pierre Joye
c808d70bb3 - #39217, use openssl i2s_ASN1_INTEGER to get a string representation of
the integer (large or not). It also keeps BC by using only decimal fmt
- add test
2006-10-21 00:28:56 +00:00
Antony Dovgal
50eac21f67 fix #39217 (serialNumber is might be -1 when the value is too big) 2006-10-20 23:21:07 +00:00
Antony Dovgal
8799fe1b60 fix compile warning 2006-10-15 21:10:10 +00:00
Hannes Magnusson
31212f9c0b MFB5.2
Constants:
 - OPENSSL_VERSION_TEXT
 - OPENSSL_VERSION_NUMBER
 - OPENSSL_KEYTYPE_EC
 Functions:
 - openssl_pkey_get_details()
 - openssl_csr_get_subject()
 - openssl_csr_get_public_key
2006-10-09 14:43:53 +00:00
Hannes Magnusson
9b3dde791d Fix tests 2006-10-09 14:42:48 +00:00
Pierre Joye
b16d1861a6 - MFB: fix possible segfault (see test 004) always exists and returns NULL
on error (thx Bjori for the head up)
2006-10-09 00:06:41 +00:00
Hannes Magnusson
176b72284c Error message clean up
(patch by Matt W (php_lists -AT- realpain.com))
2006-10-08 13:34:24 +00:00
Ilia Alshanetsky
af3fade033 MFB: Fixed bug #39039 (SSL: fatal protocol error when fetching HTTPS from
servers running Google web server).
2006-10-05 00:38:19 +00:00
Nuno Lopes
61b043bfd7 MFB 2006-09-16 12:05:43 +00:00
Antony Dovgal
a98f411f80 remove a leftover 2006-09-12 10:53:51 +00:00
Antony Dovgal
49f7759c27 implement feature request #38731 (openssl_pkey_new does not support DSA key generation)
patch by marci at balabit dot hu
2006-09-08 20:09:08 +00:00
Ilia Alshanetsky
cb1ba9379d MFB: Fixed memory leaks in openssl test #004 2006-09-07 14:16:54 +00:00
Antony Dovgal
6c977ee076 add new test for multiple leaks in openssl_csr_new() 2006-09-05 14:04:36 +00:00
Antony Dovgal
4c6db31984 init variables 2006-09-05 13:59:08 +00:00
Antony Dovgal
ac978370c9 fix test 2006-09-05 13:58:47 +00:00
Antony Dovgal
3aca07552a fix test 2006-08-31 13:49:39 +00:00
Antony Dovgal
3b62798018 fix problem with mixed arguments accepted as zval* causing leaks/segfaults when converting to other types 2006-08-31 13:47:32 +00:00
Antony Dovgal
c3890b0044 fix segfault/leak, add test 2006-08-30 21:50:29 +00:00
Antony Dovgal
2229e563e4 fix segfault in openssl_seal(), add test 2006-08-30 20:49:46 +00:00
Ilia Alshanetsky
270a5b8bb1 MFB: Fixed compiler warning. 2006-07-31 03:41:43 +00:00
Pierre Joye
7cd4c92c1a - MFB: #36732, add req_extensions support to openssl_csr_new and _sign
(ben at psc dot edu)
- MFB: fix leaks in openssl_csr_new and sig
2006-07-31 00:36:10 +00:00
Pierre Joye
6dc7a18d7c - #28382, add support for x509 extensions 2006-07-30 17:02:28 +00:00
Pierre Joye
30901dc4cd - MFB: #38261, openssl_x509_parse leaks with invalid certs 2006-07-30 16:27:03 +00:00
Pierre Joye
33cfa68757 - MFB: silent compiler warnins (signess) 2006-07-30 09:18:24 +00:00
Pierre Joye
9d93ae55c6 - MFB: vi happiness 2006-07-30 08:28:49 +00:00
Pierre Joye
5016f0d0e9 - make the test more obvious and add an explanation 2006-07-29 23:03:38 +00:00
Antony Dovgal
9941fd7185 MFB: improve test 2006-07-29 22:41:35 +00:00
Pierre Joye
3a2fb91020 - #38255, fails on array as well 2006-07-29 22:39:52 +00:00
Pierre Joye
cd314aea49 - MFH: #38255, fix possible leak in php_openssl_evp_from_zval 2006-07-29 22:24:49 +00:00
Pierre Joye
1329f72f90 - #37820, add support for algorithm type in openssl_verify() 2006-07-29 21:54:46 +00:00
Pierre Joye
1902e8973c - MFB: fix leaks in openssl context options 2006-05-26 01:48:25 +00:00
Wez Furlong
021e1a3255 merge from branch: peer certificate capture context options. 2006-04-30 23:45:14 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Andi Gutmans
ac1e7362b3 - More safe_mode nuking 2006-02-19 03:07:39 +00:00
Andi Gutmans
e94e25e621 Start nuking safe_mode. Still a lot of work to do... 2006-02-19 00:55:22 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Ilia Alshanetsky
18685ea039 MFB51: Improve "skip" checks 2005-12-27 17:17:11 +00:00
foobar
a208d9a966 - Nuke php3 legacy 2005-12-06 02:28:26 +00:00
Alan Knowles
9aa88e7e43 fix bug #35381 - ensure library is initialized before use 2005-11-28 10:28:17 +00:00
Dmitry Stogov
7eeb91187b Fixed memory allocation bug 2005-09-07 15:34:50 +00:00
foobar
03cec74a0d Nuked EOLs from error messages 2005-08-18 13:34:04 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Wez Furlong
efc6ccaa01 Add optional parameter to openssl_pkcs7_verify() which specifies the name
of a file that will be filled with the verified data, but with the signature
information stripped.

Patch by Marton Kenyeres, mkenyeres (at) konvergencia dot hu
2005-06-30 14:25:41 +00:00
foobar
b8ac8eeca6 - Never use Z_TYPE* macros on non-zvals. 2005-04-19 22:04:28 +00:00
Ilia Alshanetsky
8c38ac19bf Fixed possible usage of str without being initialized. 2005-03-15 00:27:52 +00:00
foobar
005b2d77bf - Fixed bug #18613 (Multiple OUs in x509 certificate not handled properly) 2005-03-14 21:00:03 +00:00
Wez Furlong
126e524635 Fix build... 2005-01-01 14:32:59 +00:00
foobar
5ac375a40d - Fixed bug #31101 (missing kerberos header file path with --with-openssl) 2004-12-30 14:50:06 +00:00
Wez Furlong
843807c647 When a socket is non-blocking, don't block ssl enabled sockets.
Allow for non-blocking negotiation when calling stream_socket_enable_crypto().
That function will return the foolowing values:

false - negotiation failed
0     - try again when more data is available (only for non-blocking sockets)
true  - ssl was enabled
2004-12-25 02:02:56 +00:00
Joe Orton
ee39ec7d0a Remove unused variable. 2004-11-03 13:12:41 +00:00
Wez Furlong
c8cc96e6fe Fix possible crash; patch by Kamesh Jayachandran 2004-10-27 11:07:26 +00:00
Wez Furlong
0a4127a610 Fix for Bug #29418 (double free when openssl_csr_new fails).
Also hook up MSHUTDOWN function which appears to have never been enabled.

Patch by Kamesh Jayachandran
2004-10-26 09:24:07 +00:00
Anantha Kesari H Y
7387db4366 Included select.h for NetWare 2004-09-29 10:28:17 +00:00
Wez Furlong
99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
Magnus M��tt�
17c77a54bf Add missing stream unregister for sslv2 and 3. 2004-09-13 18:30:30 +00:00
Wez Furlong
0bc0ccce2b Fix Bug #29296: add explicit sslv2 and sslv3 transports 2004-09-10 11:43:47 +00:00
Anantha Kesari H Y
d725f3af91 NetWare specific openssl build file 2004-07-16 08:59:24 +00:00
Wez Furlong
ad99c124c4 Finally a fix for #23220: IIS does not cleanly close SSL connections.
Also enable the safe and recommended bug work around options in the SSL
context.
2004-05-23 10:36:08 +00:00
Marcus Boerger
29cfd6d24f - Remove unused blocks 2004-05-19 08:56:50 +00:00
Wez Furlong
e9920ede1f Fix bug #28096 - stream_socket_accept() on an SSL server socket doesn't
enable SSL on the accepted socket.

- Add cipher list context option
- Add helpful hint about why SSL server socket fails with mysterious
  error (eg: you need an SSL certificate for most ciphers).
2004-04-21 23:02:06 +00:00
Ilia Alshanetsky
0d0fffe98b Fixed compiler warnings. 2004-03-29 19:57:51 +00:00
foobar
f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Ilia Alshanetsky
cba426ca13 Fixed uninitialized usage of mdtype when unknown signature algorithm is
found.
2003-12-21 18:17:20 +00:00
Wez Furlong
43b0ae0a04 openssl support for the new build 2003-12-05 23:13:30 +00:00
Ilia Alshanetsky
22142c392c Fixed compiler warning due to unused variables. 2003-12-03 15:50:27 +00:00
Wez Furlong
6d86bb9e40 (sort of) MFB, feof fix for sockets. 2003-11-28 23:20:23 +00:00
Wez Furlong
eaf0942c8b Port liveness and SSL CA validation from 4.3 branch.
Make stream_select() work on ssl-enabled sockets again.
2003-11-27 17:40:16 +00:00
Wez Furlong
42ae98d7a2 Fix unintialized variable.
Patch by Joe Orton.
2003-10-13 11:43:14 +00:00
Wez Furlong
e087da60dc And this EOF flag... 2003-10-08 11:23:47 +00:00
Wez Furlong
f7d32e30b0 Fix 2003-09-24 10:35:20 +00:00
foobar
08effa1b04 Fixed typo. 2003-09-23 19:29:34 +00:00