|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-16 07:13 UTC] mike@php.net
-Assigned To:
+Assigned To: rdlowrey
[2015-07-16 07:13 UTC] mike@php.net
[2017-10-24 06:20 UTC] kalle@php.net
-Status: Assigned
+Status: Open
-Assigned To: rdlowrey
+Assigned To:
[2021-07-28 11:06 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-07-28 11:06 UTC] cmb@php.net
[2021-07-28 11:06 UTC] cmb@php.net
[2021-08-08 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
Description: ------------ tls connections using stream_socket_client appear to be failing since php 5.6.7 (it's happening in both 5.6.7 and 5.6.8) Connections are failing with the error message: "stream_socket_client(): Failed to enable crypto" The following snippet of code works in php 5.6.6 and lower, but fails in 5.6.7/5.6.8 $contextArray['ssl']['cafile'] ='/pathtomycafile.pem' $contextArray['ssl']['local_cert'] ='/pathtomycertfile.pem' $contextArray['ssl']['peer_name']= 'mypeername' $context = stream_context_create($contextArray); $myhost='myhost'; $myport='12345'; $sock = stream_socket_client('tls://$myhost:$myport, $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context); As a workaround, the stream_socket_client call can be changed to use ssl instead, which works in 5.6.6 and 5.6.7/5.6.8 $sock = stream_socket_client('ssl://$myhost:$myport, $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context);