Bug #77749 [NEW]: OpenSSL and alert protocol version

From: Date: Fri, 15 Mar 2019 18:10:37 +0000
Subject: Bug #77749 [NEW]: OpenSSL and alert protocol version
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219986@lists.php.net to get a copy of this message
From: lodashes at gmail dot com Operating system: Windows7, Linux Mint PHP version: 7.3.3 Package: *Network Functions Bug Type: Bug Bug description:OpenSSL and alert protocol version Description: ------------ Hello! I can’t set up working with a secure connection, I cannot determine the cause of the error, maybe I have incorrectly configured the context of the SSL options and I need to specify additional parameters? I tried version 7.2 but the error was the same, I tried to connect to different https servers - failed, connect fails but data exchange fails, I tried to ask a question on the forum - I was told that the reason for the protocol mismatch and it is outdated, I hope YOU help me figure it out, please! Test script: --------------- $nl = "\r\n"; $headers = ( "GET / HTTP/1.1" . $nl . "Host: www.ssllabs.com". $nl . "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0". $nl . "Content-Length: 0". $nl . "Connection: close". $nl . $nl ); $context = stream_context_create([ 'ssl' => [ 'verify_peer_name' => false, 'verify_peer' => false ] ]); $f = stream_socket_client('ssl://64.41.200.100:443',$a,$b,30,STREAM_CLIENT_CONNECT,$context); var_dump(stream_socket_sendto($f,$headers)); echo stream_get_contents($f); Expected result: ---------------- Valid HTTP Response Actual result: -------------- WARNING stream_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version on line number 19 -- Edit bug report at https://bugs.php.net/bug.php?id=77749&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77749&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77749&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77749&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77749&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77749&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77749&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77749&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77749&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77749&r=support Expected behavior: https://bugs.php.net/fix.php?id=77749&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77749&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77749&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77749&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77749&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77749&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77749&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77749&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77749&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77749&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77749&r=mysqlcfg

« previous php.bugs (#219986) next »