php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #67224 stream_socket_enable_crypto() requires crypto type when enabling
Submitted: 2014-05-07 10:20 UTC Modified: 2014-05-07 14:20 UTC
From: daverandom@php.net Assigned: rdlowrey (profile)
Status: Closed Package: Streams related
PHP Version: 5.6.0beta2 OS: Any
Private report: No CVE-ID: None
 [2014-05-07 10:20 UTC] daverandom@php.net
Description:
------------
Since 5.6.x the crypto type can be determined from the ssl->crypto_method stream context value, it should no longer be a required argument. An error should emitted only when neither value is supplied.

Test script:
---------------
$sock = stream_socket_client('tcp://google.com:443');
stream_context_set_option($sock, 'ssl', 'crypto_method', STREAM_CRYPTO_METHOD_TLS_CLIENT);
stream_socket_enable_crypto($sock, true);


Expected result:
----------------
Crypto enabling succeeds, with method determined from the stream's context options

Actual result:
--------------
Crypto enabling fails because 3rd argument is not supplied

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-07 14:18 UTC] rdlowrey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: rdlowrey
 [2014-05-07 14:20 UTC] rdlowrey@php.net
-Status: Assigned +Status: Closed
 [2014-05-07 14:20 UTC] rdlowrey@php.net
PR607 has been merged and this should now be fixed in PHP-5.6 and master. The changes will be reflected in the 5.6beta3 release.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 08:01:28 2024 UTC