php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26040 TLS is broken
Submitted: 2003-10-30 09:18 UTC Modified: 2003-10-30 11:24 UTC
From: php at hyperion dot ath dot cx Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4CVS-2003-10-30 (stable) OS: FreeBSD 5.1p10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at hyperion dot ath dot cx
New email:
PHP Version: OS:

 

 [2003-10-30 09:18 UTC] php at hyperion dot ath dot cx
Description:
------------
tls:// doesn't work on Port 143 as it should.
It works like ssl:// on Port 993 only. This is wrong, and it seems TLS doesnt really initiate STARTTLS but normal SSL.
tls:// should work on Port 143.

Tested this on 4.3.4RC3 and 2003-10-30stable.


Reproduce code:
---------------
dumb fsockopen=("tls://bla",143);
will return  fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267)

Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed

Works with Port 993

Expected result:
----------------
No errors. Working on Port 143


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-30 11:24 UTC] wez@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

TLS and SSL are names for two "similar" kinds of application level crypto.  Opening a socket with tls:// or ssl:// via fsockopen opens the socket with crypto turned on.  tls:// does not perform STARTTLS negotiation as that is protocol specific - how can PHP guess which protocol you are talking? :-)

Currently, there is no way (from userspace) to open a clear text tcp:// socket and then switch on tls:// mode.  This is a feature that will be present in PHP 5.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 02 23:01:30 2025 UTC