From: php at hyperion dot ath dot cx
Operating system: FreeBSD 5.1p10
PHP version: 4CVS-2003-10-30 (stable)
PHP Bug Type: IMAP related
Bug description: TLS is broken

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


--
Edit bug report at [url]http://bugs.php.net/?id=26040&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=26040&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=26040&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=26040&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=26040&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=26040&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=26040&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=26040&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=26040&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=26040&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=26040&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=26040&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=26040&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=26040&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=26040&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=26040&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=26040&r=float[/url]