stream_socket_enable_crypto() requires crypto type when enabling
| 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
History
AllCommentsChangesGit/SVN commits
[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