|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-28 09:21 UTC] tony2001@php.net
[2010-12-14 12:56 UTC] hamdisahloul at hotmail dot com
[2013-07-10 01:00 UTC] ross at golder dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 20:00:01 2025 UTC |
Description: ------------ (this is actually php 5.1.6) using the tls target, fsockopen() tries to negotiate SSL instead of starting a connection and negotiating STARTTLS. Reproduce code: --------------- Scott PHP # cat tls-test.php <? $fp = fsockopen("tls://mail.blue-labs.org", 25, $errno, $errstr); ?> Expected result: ---------------- I expect it to open a connection and negotiate STARTTLS. ssl:// should start an SSL connection, tls:// should start a TLS connection Actual result: -------------- Scott PHP $ php ./tls-test.php Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in /home/david/svn/BlueLabs/BlueList/PHP/tls-test.php on line 3 Warning: fsockopen(): Failed to enable crypto in /home/david/svn/BlueLabs/BlueList/PHP/tls-test.php on line 3 Warning: fsockopen(): unable to connect to tls://mail.blue-labs.org:25 (Unknown error) in /home/david/svn/BlueLabs/BlueList/PHP/tls-test.php on line 3 (trimmed for brevity) NOQUEUE: connect from [69.167.98.28] AUTH: available mech=CRAM-MD5, allowed mech=DIGEST-MD5 CRAM-MD5 LOGIN PLAIN --- 220-sunny-beach.m2000inc.com ESMTP --- 220 <-- \026\003\001 --- 500 5.5.1 Command unrecognized: "\026\003\001" <-- --- 500 5.5.1 Command unrecognized: "" --- 421 4.4.1 sunny-beach.m2000inc.com Lost input channel from [69.167.98.28] [69.167.98.28] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA