php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78051 Disabling crypto on a crypto-enabled stream socket succeeds silently
Submitted: 2019-05-22 18:00 UTC Modified: 2019-05-26 16:38 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: info at charuru dot moe Assigned:
Status: Open Package: OpenSSL related
PHP Version: Irrelevant OS: Windows 7 Ultimate x64
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: info at charuru dot moe
New email:
PHP Version: OS:

 

 [2019-05-22 18:00 UTC] info at charuru dot moe
Description:
------------
When you try to disable encryption on a stream socket (with encryption enabled), the operation succeeds, however PHP reports this as failure. Both the server and client are able to read and write successfully after disabling encryption.

Test script:
---------------
server.php: https://hastebin.com/zuwamexero.xml
client.php: https://hastebin.com/idadesujal.xml


Expected result:
----------------
server:
string(17) "Hello unencrypted"
bool(true)
string(15) "Hello encrypted"
bool(true)
string(17) "Hello unencrypted"

client:
int(17)
bool(true)
int(15)
bool(true)
int(17)

Actual result:
--------------
server:
string(17) "Hello unencrypted"
bool(true)
string(15) "Hello encrypted"
bool(false)
string(17) "Hello unencrypted"

client:
int(17)
bool(true)
int(15)
bool(false)
int(17)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-05-26 16:38 UTC] info at charuru dot moe
-PHP Version: 7.2.18 +PHP Version: Irrelevant
 [2019-05-26 16:38 UTC] info at charuru dot moe
This bug exists across all maintained versions. 7.2.18 is just the one I tested locally. The others were tested on Travis CI.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sat Oct 19 10:01:26 2019 UTC