Bug #55236 [Opn->Ver]: Can't open a connection via TLS

From: Date: Thu, 20 Feb 2014 22:15:47 +0000
Subject: Bug #55236 [Opn->Ver]: Can't open a connection via TLS
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184379@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55236&edit=1 ID: 55236 Updated by: rdlowrey@php.net Reported by: mark_lanthaler at gmx dot net Summary: Can't open a connection via TLS -Status: Open +Status: Verified Type: Bug Package: OpenSSL related Operating System: Ubuntu PHP Version: 5.3.6 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2011-07-19 04:49:40] mark_lanthaler at gmx dot net Description: ------------ When opening a socket to smtp.live.com with TLS via $fp = fsockopen("tls://smtp.live.com", 587, $errno, $errstr, 3); It's neither a problem to establish a SSL connection via PHP or to connect to smtp.live.com via openssl at the command line: openssl s_client -starttls smtp -connect smtp.live.com:587 Test script: --------------- $fp = fsockopen("tls://smtp.live.com", 587, $errno, $errstr, 3); if (!$fp) { echo "$errstr ($errno)"; } Expected result: ---------------- A connection being established. Actual result: -------------- PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /var/www/test.php on line 4 PHP Warning: fsockopen(): Failed to enable crypto in /var/www/test.php on line 4 PHP Warning: fsockopen(): unable to connect to tls://smtp.live.com:587 (Unknown error) in /var/www/test.php on line 4 Reason 267 is according to ssl.h "SSL_R_WRONG_VERSION_NUMBER". Thus I suspect that's the same issue as in bug #29296. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55236&edit=1

« previous php.bugs (#184379) next »