Commit Graph

164 Commits

Author SHA1 Message Date
Chris Wright
e7df9d710c Fix stream_select() issue with OpenSSL buffer
Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-05 17:18:14 -07:00
Daniel Lowrey
ca24d19a89 Really fix zts this time 2015-03-05 14:09:25 -07:00
Daniel Lowrey
c985ec737d Fix ZTS 2015-03-05 12:19:15 -07:00
Daniel Lowrey
65a9a5ca12 Fixed bug #68265 (SAN match fails with trailing DNS dot) 2015-03-04 23:55:42 -07:00
Daniel Lowrey
1de1ff75f5 Merge branch 'PHP-5.6' of https://github.com/bjori/php-src into PHP-5.6
* 'PHP-5.6' of https://github.com/bjori/php-src:
  hexadecimal is case*in*sensitive
2015-03-04 22:55:22 -07:00
Daniel Lowrey
5dcace058a Fixed bug #68879 (IP Address fields in subjectAltNames not used) 2015-03-04 22:39:25 -07:00
Hannes Magnusson
3c2c029bfd hexadecimal is case*in*sensitive 2015-03-04 16:03:45 -08:00
Daniel Lowrey
241f3c34b8 Fixed bug #68920 (use strict peer_fingerprint input checks) 2015-03-04 12:47:46 -07:00
Anatol Belski
b3d28d14d6 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix condition
2015-02-13 13:40:10 +01:00
Anatol Belski
5ff77b005b fix condition 2015-02-13 13:39:46 +01:00
Daniel Lowrey
fb2314798e Merge branch 'PHP-5.5' into PHP-5.6
Conflicts:
	ext/openssl/xp_ssl.c
2015-02-09 11:44:09 -05:00
Daniel Lowrey
1eef4f2a0c Miscellaneous cleanup 2015-02-09 11:42:17 -05:00
Brad Broerman
dddbe0fc33 Update xp_ssl.c
Added TSRMLS_CC to php_openssl_sockop_io calls.
2015-02-04 10:13:36 -05:00
Brad Broerman
1482ed2d56 reneg and should_close are not yet members of sslsock. Removing... 2015-01-28 22:36:41 -05:00
Brad Broerman
fd4641696c Updated with SSL fixes (backported from trunk) 2015-01-28 00:04:20 -05:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Ferenc Kovacs
feadaaed56 Revert "Merge branch 'PHP-5.5' into PHP-5.6"
This reverts commit 98e67add15, reversing
changes made to 2cdc1a2b74.
2014-10-15 19:34:07 +02:00
Ferenc Kovacs
4fb998d42f Revert "fix TS build"
This reverts commit 84a4041ba4.
2014-10-15 19:33:47 +02:00
Ferenc Kovacs
7b8222aa44 Revert "Merge branch 'PHP-5.4' into PHP-5.5"
This reverts commit 30a73658c6, reversing
changes made to 7fac56e072.
2014-10-15 19:33:31 +02:00
Ferenc Kovacs
528e4166a6 Revert "Bug #67965: Fix blocking behavior in non-blocking crypto streams"
This reverts commit f86b2193a4.
2014-10-15 19:32:46 +02:00
Ferenc Kovacs
ff91a48f6e Revert "Bug #41631: Fix regression from first attempt (6569db8)"
This reverts commit 372844918a.
2014-10-15 19:32:14 +02:00
Julien Pauli
6d9c9f8f04 Revert "Bug #41631: Observe socket read timeouts in SSL streams"
This reverts commit 6569db8808.

Conflicts:
	ext/openssl/xp_ssl.c
2014-10-15 14:38:12 +02:00
Remi Collet
0d776ef87b Fix bug #68074 Allow to use system cipher list instead of hardcoded value 2014-09-24 10:34:55 +02:00
Daniel Lowrey
edb2799333 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Bug #41631: Fix regression from first attempt (6569db8)
  Bug #67965: Fix blocking behavior in non-blocking crypto streams
2014-09-09 10:24:40 -06:00
Daniel Lowrey
bf2f80b223 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Bug #41631: Fix regression from first attempt (6569db8)
  Bug #67965: Fix blocking behavior in non-blocking crypto streams
2014-09-09 09:27:20 -06:00
Daniel Lowrey
372844918a Bug #41631: Fix regression from first attempt (6569db8) 2014-09-09 09:01:42 -06:00
Daniel Lowrey
f86b2193a4 Bug #67965: Fix blocking behavior in non-blocking crypto streams 2014-09-09 07:37:57 -06:00
Chris Wright
db03216e62 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix stream_select() issue with OpenSSL buffer
2014-08-27 16:06:28 +01:00
Chris Wright
30a73658c6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix stream_select() issue with OpenSSL buffer

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-27 16:01:18 +01:00
Chris Wright
32be79dcfa Fix stream_select() issue with OpenSSL buffer
Ensure data from OpenSSL internal buffer has been
transfered to PHP stream buffer before a select()
emulation operation is performed

Addresses bug #65137
https://bugs.php.net/bug.php?id=65137

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-27 13:25:50 +01:00
Daniel Lowrey
546a32e2b3 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Bug #67850: Build when OpenSSL compiled without SSLv3 support

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-25 18:16:38 +02:00
Daniel Lowrey
640214701c Bug #67850: Build when OpenSSL compiled without SSLv3 support 2014-08-25 17:28:09 +02:00
Anatol Belski
8b8297170e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix TS build
2014-08-07 19:50:45 +02:00
Anatol Belski
75991561d6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix TS build
2014-08-07 19:50:25 +02:00
Anatol Belski
84a4041ba4 fix TS build 2014-08-07 19:49:59 +02:00
Daniel Lowrey
98e67add15 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Bug #41631: Observe socket read timeouts in SSL streams

Conflicts:
	ext/openssl/xp_ssl.c
2014-08-07 12:07:55 -04:00
Daniel Lowrey
5ac2e5f850 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Bug #41631: Observe socket read timeouts in SSL streams
2014-08-07 11:51:42 -04:00
Daniel Lowrey
6569db8808 Bug #41631: Observe socket read timeouts in SSL streams 2014-08-07 11:47:42 -04:00
Tjerk Meesters
8f345a7148 Moved streams related functions to xp_ssl.c 2014-07-31 12:17:17 +08:00
Tjerk Meesters
a7dad26c4b Wildcards should only be used in the first name component; fixed comment style 2014-07-29 19:15:01 +08:00
Tjerk Meesters
38e714ece5 Fixed #67666 - Subject altName doesn't match wildcards 2014-07-24 14:36:31 +08:00
Lior Kaplan
cbcbf73fe8 Add ifdef on ecdh for single_ecdh_use
Allows build with OpenSSL < 0.9.8
2014-07-16 00:10:29 +03:00
Daniel Lowrey
0e023e9784 Bug #66840: Fix broken build when extension built separately 2014-04-13 15:17:50 -06:00
Daniel Lowrey
fad14e3180 Add encrypted server SNI support
- New "SNI_server_certs" context option maps host names to
  appropriate certs should client handshakes advertise the
  SNI extension:

    $ctx = stream_context_create(["ssl" => [
        "local_cert" => "/path/to/cert.pem",
        "SNI_server_certs" => [
            "domain1.com" => "/path/to/domain1.pem",
            "*.domain2.com" => "/path/to/domain2.pem",
            "domain3.com" => "/path/to/domain3.pem"
        ]
    ]]);

- Prefixing a "*." will utilize the matching cert if a client
  requests the primary host name or any subdomain thereof. So
  in the above example our "domain2.pem" will be used for both
  requests to "domain2.com" -and- "subdomain.domain2.com"
- The "SNI_server_certs" ctx option has no effect for client
  streams.
- SNI support is enabled by default as of 5.6 for both servers
  and clients. Servers must specify the "SNI_server_certs" array
  to actually use the SNI extension, though.
- If the `"SNI_enabled" => false` ctx option is also passed then
  "SNI_server_certs" has no effect.
- While supporting SNI by itself is enough to successfully
  negotiate the TLS handshake with many clients, servers MUST
  still specify a "local_cert" ctx option or run the risk of
  connection failures from clients that do not support the SNI
  extension.
2014-03-05 10:03:33 -07:00
datibbaw
020e161966 Raise timeout to 2s, reworded ssl timeout warning 2014-03-05 10:03:23 -07:00
Daniel Lowrey
27849c998a Refactor + reorganize openssl files
- All streams-related code now lives in xp_ssl.c. Previously
  stream code was split across both openssl.c and xp_ssl.c
- Folded superfluous php_openssl_structs.h into xp_ssl.c
- Server-specific options now set on SSL_CTX instead of SSL
- Deprecate SNI_server_name ctx option
- Miscellaneous refactoring
2014-03-05 10:03:11 -07:00
Daniel Lowrey
c126c16479 Capture peer cert even if verify fails
Previously the "capture_peer_cert" SSL context option only
captured the peer's certificate if the verification routine
succeeded.

By also capturing the on verify failure applications have the
ability to parse the cert and ask users whether they wish to
proceed given the information presented by the peer.
2014-03-02 10:35:52 -07:00
Daniel Lowrey
2bc0dbab44 Prevent implicit function declaration when TLSEXT unavailable 2014-02-25 19:12:33 -07:00
Anatol Belski
5b6ef90bc0 fix linkage
"extern inline" looks like tricky case for portability, but extern
is required with VS. So reduce the case to a starndard one to avoid
unporbatibily.
2014-02-21 23:09:16 +01:00