Commit Graph

39 Commits

Author SHA1 Message Date
Ilia Alshanetsky
f267153613 MFB: Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). 2008-09-11 23:56:57 +00:00
Antony Dovgal
3519ed9e31 manage references of stream context properly 2008-07-11 10:24:29 +00:00
Hannes Magnusson
ef552c57de MFB53: Fixed bug#44716 (Progress notifications incorrect) 2008-04-14 12:17:38 +00:00
Joe Orton
8176b6e8f4 Fixed bug #32979 (OpenSSL stream->fd casts broken in 64-bit build)
(stotty at tvnet dot hu)
2008-04-04 12:49:57 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Nuno Lopes
b514dc1070 MFB: fix compiler warnings 2007-09-29 11:26:51 +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
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
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
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
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
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Dmitry Stogov
7eeb91187b Fixed memory allocation bug 2005-09-07 15:34:50 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +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
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
Wez Furlong
0bc0ccce2b Fix Bug #29296: add explicit sslv2 and sslv3 transports 2004-09-10 11:43:47 +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
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
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +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
e087da60dc And this EOF flag... 2003-10-08 11:23:47 +00:00
Wez Furlong
ad93053ec4 Merge remaining code from 4.3 to fix #22238 in HEAD. 2003-09-21 18:02:08 +00:00
Edin Kadribasic
6e2743023b Win32 build fixes for openssl 2003-06-15 23:34:46 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sara Golemon
a8711474c0 Debug watches probably don't belong in CVS. 2003-04-05 17:31:34 +00:00
Wez Furlong
267db80b21 avoid unsigned issues. 2003-03-18 15:15:10 +00:00
Wez Furlong
1b53a2d12e New user-space functions:
. stream_socket_client() - similar to fsockopen(), but more powerful.
  . stream_socket_server() - Creates a server socket.
  . stream_socket_accept() - Accept a client connection.
  . stream_socket_get_name() - Get local or remote name of socket.

Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
2003-02-28 19:53:21 +00:00
foobar
08b5f6b2b9 - No need to include the ssl headers elsewhere but in ext/openssl
# ext/ftp doesn't use streams yet so it needs to include them.
2003-02-28 07:25:15 +00:00
Ilia Alshanetsky
57eabeea29 fixed compiler warnings. 2003-02-27 23:50:55 +00:00
Wez Furlong
fd61f69077 Another big commit (tm).
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
  some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
  (currently only supports OpenSSL, but could support other SSL toolkits,
  and other crypto transport protocols).

Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
  removing the link-time requirement for ssl:// and https:// sockets and
  streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
  there are now a range of possible socket-type streams.

Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.

# I will be updating the win32 build to add the new files shortly
# after this commit.
2003-02-27 17:43:38 +00:00