My guess is that websocket_client_sync_ssl.cpp is implementing a websocket client on top of 'raw' SSL and TCP (which is what's needed to talk to a websocket server from a native application, but is pointless in the browser).
Browsers already contain such a websocket client in form of the WebSocket Javascript API (https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API), Emscripten offers two API wrappers over websockets, one that's basically a 'POSIX socket emulation', and another that's a direct wrapper of the Javascript API: https://emscripten.org/docs/porting/networking.html On Friday, 31 March 2023 at 17:57:25 UTC+2 dgor...@gmail.com wrote: > I built a client app and a server app both based on boost::beast. There > are like > https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/client/sync-ssl/websocket_client_sync_ssl.cpp > > and > https://www.boost.org/doc/libs/develop/libs/beast/example/websocket/server/sync-ssl/websocket_server_sync_ssl.cpp > . > As usual applications they connect well. But when I compiled the client > with emscripten, I can't connect to the server. > In CXX_FLAGS I use "-s WEBSOCKET_URL=wss:// -s > WEBSOCKET_SUBPROTOCOL='text'". > I built openssl in emscripten and link to it. > I generated a certificate and use it in both apps. > But in any case I get > ``` > sslv3 alert certificate unknown (SSL routines) > ``` > How should I use ssl in webasm? How should I use certificates? Did anybody > do something like that? > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/b94f2d7d-2a51-4040-b4dc-a76e5fefb9e9n%40googlegroups.com.