Skip to content
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

Use SERVER with TLS cert e pk #24

Open
AntonioRiccelli77 opened this issue Oct 10, 2023 · 0 comments
Open

Use SERVER with TLS cert e pk #24

AntonioRiccelli77 opened this issue Oct 10, 2023 · 0 comments

Comments

@AntonioRiccelli77
Copy link

AntonioRiccelli77 commented Oct 10, 2023

Hello, i'm need a simplest solution with y're websocket. I test and run the server but i don't understanding what is the correct use of the constructor.:

\vakata\websocket\Server('wss://0.0.0.0:8765','/etc/ssl/certs/ca.crt',null,'/etc/ssl/private/ca.key');

my ca.crt is selfsigned with:
sudo openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/ssl/private/ca.key -out /etc/ssl/certs/ca.crt

and it already worked and used in Apache2 HTTPS

but i obtain an error in Debian 12 bash terminal prompt when a web client connect to it

user@deb-vbox:~$ php wss.php
PHP Warning: stream_socket_accept(): SSL operation failed with code 1. OpenSSL Error messages:
error:0A000416:SSL routines::sslv3 alert certificate unknown in /home/user/vendor/vakata/websocket/src/Server.php on line 106
PHP Warning: stream_socket_accept(): Failed to enable crypto in /home/user/vendor/vakata/websocket/src/Server.php on line 106
PHP Warning: stream_socket_accept(): Accept failed: Success in /home/user/vendor/vakata/websocket/src/Server.php on line 106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant