Commit Graph

206 Commits

Author SHA1 Message Date
Daniel Lowrey
c34ee4b146 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #67403 (Add signatureType to openssl_x509_parse)
  5.5.24 now

Conflicts:
	ext/openssl/openssl.c
2015-03-05 10:27:11 -07:00
Daniel Lowrey
5939de35a8 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #67403 (Add signatureType to openssl_x509_parse)
  5.5.24 now

Conflicts:
	configure.in
	main/php_version.h
2015-03-05 10:21:32 -07:00
Daniel Lowrey
94140afa69 Fix bug #67403 (Add signatureType to openssl_x509_parse) 2015-03-05 10:09:06 -07:00
Daniel Lowrey
73de105481 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68265 (SAN match fails with trailing DNS dot)
2015-03-04 23:56:36 -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
94a70b98a6 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68879 (IP Address fields in subjectAltNames not used)
  Fix broken test

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-04 22:42:25 -07:00
Daniel Lowrey
5dcace058a Fixed bug #68879 (IP Address fields in subjectAltNames not used) 2015-03-04 22:39:25 -07:00
Daniel Lowrey
ca766e0787 Fix broken test 2015-03-04 22:37:07 -07:00
Daniel Lowrey
b5d97140c0 Merge branch 'tls-alpn'
* tls-alpn:
  Improve test to target specific issue
  Misc updates/cleanup
  Add TLS ALPN extension support in crypto client/server streams
  Add stream_socket_crypto_info() function
  Update for compatibility with newer openssl libs
2015-03-04 13:56:58 -07:00
Daniel Lowrey
5de64a29e6 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fixed bug #68920 (use strict peer_fingerprint input checks)

Conflicts:
	ext/openssl/xp_ssl.c
2015-03-04 12:50:35 -07:00
Daniel Lowrey
241f3c34b8 Fixed bug #68920 (use strict peer_fingerprint input checks) 2015-03-04 12:47:46 -07:00
Daniel Lowrey
8680fc8331 Improve test to target specific issue 2015-03-04 10:23:46 -05:00
Xinchen Hui
10fe317300 Merge branch 'PHP-5.6'
Conflicts:
	ext/openssl/openssl.c
2015-02-16 14:18:08 +08:00
Xinchen Hui
8309988111 Fixed bug #68912 (Segmentation fault at openssl_spki_new) 2015-02-16 14:16:52 +08:00
Andrea Faulds
e5eb9530ab Use "float" and "integer" in typehint and zpp errors 2014-12-21 13:23:02 +00:00
Stanislav Malyshev
25e3e78016 Merge branch 'pull-request/916'
* pull-request/916:
  Adds test cases for openssl EC improvements
  Adds better handling of EC keys: OPENSSL_KEYTYPE_EC
2014-11-30 18:27:37 -08:00
Stanislav Malyshev
8c08124c0e Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Adds test cases for openssl EC improvements
  Adds better handling of EC keys: OPENSSL_KEYTYPE_EC
2014-11-30 18:24:23 -08:00
Dominic Luechinger
6048ac32b4 Adds test cases for openssl EC improvements 2014-11-30 18:17:48 -08:00
Anatol Belski
1552d6ae7b disable ext/openssl/tests/stream_server_reneg_limit.phpt for windows
This is using the openssl binary which, despite it's contained in the
deps, would probably miss all it's environment. It is just prone to
failure and thus is not worth it.
2014-11-28 12:24:32 +01:00
Dominic Luechinger
17e98661c6 Adds test cases for openssl EC improvements 2014-11-24 02:31:19 +01:00
Dominic Luechinger
437ab7f1f4 Minor fix: Missing quotes in openssl test case for bug bug64802 2014-11-23 15:15:49 -08:00
Tjerk Meesters
836a5dfddb Fixed bug #68234
Certificate will now expire in 2034
2014-10-15 21:12:13 +08:00
Ferenc Kovacs
d27f3e7b64 update the certificate used for the test, as it expired recently 2014-09-24 13:40:52 +02:00
Stanislav Malyshev
c41ca94824 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix missing type checks in various functions

Conflicts:
	ext/openssl/openssl.c
2014-07-28 00:37:32 -07:00
Stanislav Malyshev
531be9662f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix missing type checks in various functions
2014-07-28 00:34:27 -07:00
Stanislav Malyshev
b4a4db467b Fix missing type checks in various functions 2014-07-27 02:42:49 -07:00
Remi Collet
e9c9169e05 skip this test which fails without network 2014-06-20 06:45:16 +02:00
Remi Collet
fc36277eb6 Fix test on modern distro where old unsecure algo are disabled in openssl config.
Testing recent algo should be enough to check this function.
2014-06-16 09:42:55 +02:00
Stanislav Malyshev
3d9f922c03 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added support for parsing ssl certificates using GeneralizedTime format.
2014-06-08 14:19:50 -07:00
Stanislav Malyshev
4946dc1ab9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added support for parsing ssl certificates using GeneralizedTime format.
2014-06-08 14:19:16 -07:00
Paul Oehler
76a7fd893b Added support for parsing ssl certificates using GeneralizedTime format.
fix bug #65698
fix bug #66636
2014-06-08 14:17:58 -07:00
Remi Collet
89dc5924c9 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fixed Bug #66833 Default digest algo is still MD5
  Fix 5.5.10 NEWS
2014-03-14 09:52:47 +01:00
Remi Collet
e1d8c0a051 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed Bug #66833 Default digest algo is still MD5
2014-03-14 09:52:02 +01:00
Remi Collet
17f6391bf8 Fixed Bug #66833 Default digest algo is still MD5
Switch to SHA1, which match internal openssl hardcoded algo.

In most case, won't even be noticed
- priority on user input (default_md)
- fallback on system config
- fallback on this default value

Recent system reject MD5 digest, noticed in bug36732.phpt failure.

While SHA1 is better than MD5, SHA256 is recommenced,
and defined as default algo in provided configuration on
recent system (Fedora 21, RHEL-7, ...). But the idea is to
keep in sync with openssl internal value for PHP internal value.
2014-03-14 09:50:15 +01:00
Remi Collet
518a6ed95b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:30 +01:00
Remi Collet
7d5c11c235 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Set default Digest Message to use SHA1 instead of MD5 in openssl tests as MD5 signature are now rejected by newer openssl Version.
2014-03-06 10:16:16 +01:00
Remi Collet
721b9a7c8d Set default Digest Message to use SHA1 instead of MD5 in openssl tests
as MD5 signature are now rejected by newer openssl Version.

Noticed in RHEL-7 and Fedora 21 build.
2014-03-06 10:14:08 +01: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
Anatol Belski
2c1385b7f5 remove pcntl leftover from the test code 2014-02-27 15:50:17 +01:00
Daniel Lowrey
d0a6f8c68e Deprecate CN_match in favor of peer_name in SSL contexts 2014-02-26 13:20:06 -07:00
Anatol Belski
9ab73c52ab restored that test part in ext/openssl to enable notify/wait 2014-02-26 13:37:20 +01:00
Anatol Belski
bcff8d1b26 remove echo 2014-02-26 12:41:36 +01:00
Anatol Belski
56cbe04381 fix stdin reading in new openssl tests 2014-02-26 11:27:24 +01:00
Daniel Lowrey
bab017ddfd Remove test case invalidated by openssl.cafile accessibility change 2014-02-25 13:02:13 -07:00
Daniel Lowrey
bd95716b8e Merge branch 'windowsPeerVerification' of https://github.com/DaveRandom/php-src into PHP-5.6
* 'windowsPeerVerification' of https://github.com/DaveRandom/php-src:
  Update openssl tests with new server/client test harness
  Add peer certificate verification on windows
2014-02-25 12:43:52 -07:00
Daniel Lowrey
a4c7ab8399 Remove openssl tests that shouldn't have survived last merge
These are .phpt files I meant to remove with the last batch as
the same functionality is now covered in other tests and these
are no longer needed.
2014-02-25 09:59:13 -07:00
Chris Wright
d6fb7b8f2e Update openssl tests with new server/client test harness 2014-02-25 16:51:50 +00:00