Skip to content

Stream TLS Bugfix reverted - need wrapSecure #24

Closed

Description

@slowbro

In regards to this thread on reactphp/stream: reactphp/stream#17

It was found that the Stream TLS Bugfix was reverted (https://bugs.php.net/bug.php?id=65137), making TLS Streams block again.

Per @cboden the wrapSecure version check will need to be removed. Just moving this issue over to the correct project :)

Activity

  1. added this to the v0.4.3 milestone on Feb 3, 2015
  2. added a commit that references this issue on Feb 3, 2015
  3. cboden commented on Feb 3, 2015

    @cboden
    Contributor

    @slowbro Some work has been done and some PRs are now in the capable hands of @clue.

    Excellent troubleshooting and detail left in the previous issue! Just FYI on some of your comments and what's going on:

    The only way I know to reproduce this involves a lot of steps and a specific product

    Yup! When we first found this bug it wasn't (still isn't) easily reproducible. I think I remember having to stand on one leg while doing a rain dance to replicate it.


    The issue is some C code in the PHP SSL module when asked how much data is remaining in its buffer will say 0 even though there's data left in it. This means to fully receive your message you'd have to send another one to jam it through, then that one becomes jammed.

    The "fix" we're doing in SocketClient is a necessary evil of sorts...stream_get_contents is like running a while loop asking for data from the buffer until it's truly empty. This could cause blocking if a client is malicious and not letting other connections access the event loop. However, in the case of a SocketClient that's not likely and is a risk worth taking as opposed to the entire lib not working properly.

  4. slowbro commented on Feb 3, 2015

    @slowbro
    Author

    Thanks @cboden!

  5. cboden commented on Mar 20, 2015

    @cboden
    Contributor

    Merged. v0.4.3 being tagged shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions