-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
verify_peer should default to false for React\Socket\Server using TLS context #261
Comments
@michaelphipps Thanks for reporting here, this is an interesting one indeed! I agree the The PHP documentation indeed currently claims that This means that socket/tests/FunctionalSecureServerTest.php Lines 30 to 52 in c85158a
As described above, I can not reproduce the problem you're seeing and also don't see how this could happen. This is covered by the existing test suite across all supported PHP versions, so this is known to work on a variety of platforms. If you're sure this problem persists, may I ask you to provide a gist to reproduce and/or a PR with a failing test case? I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can always reopen this 👍 |
Reporting this issue as requested by @clue from this twitter in this twitter thread https://twitter.com/PhippsyTech/status/1414239527112085512
TLDR;
According to Christian,
verify_peer
should default tofalse
for server-side sockets, and not be required in the tls context.Here is my code:
I have found that verify_peer must be set to false in order for this code to work. PHP documentation shows that verify_peer defaults to true however Christian said that PHP's source sets verify_peer to false by default for server-side sockets.
if I omit verify_peer, the server runs displaying no errors. When I try to connect from the browser the websocket just shows finished.
PHP 7.4.9
"react/socket": "^1.6",
The text was updated successfully, but these errors were encountered: