1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-16 00:00:07 +01:00
libwebsockets/minimal-examples/ws-client
Fabio Alessandrelli 94f3981bef mbedtls: wrapper: client: Force mbedTLS to attemp to verify cert
AG: unlike openssl, mbedtls does not load the system trust store.
So this change will make client tls operations that work OK on openssl fail on
mbedtls unless you provide the correct CA cert.

This allows lws to distinguish between untrusted CAs, hostname
mismatches, expired certificates.

NOTE: LCCSCF_ALLOW_SELFSIGNED actually allows for untrusted CAs, and
will also skip hostname verification. This is somewhat a limitiation of
the current lws verification process.

AG: improve error reporting up to the CLIENT_CONNECTION_ERROR argument
and add a note specific to mbedtls in the test client.  Adapt the test
client to note the CA requirement if built with mbedTLS.  Adapt the
minimal test clients to have the CAs available and use them if mbedTLS.
2018-04-06 10:38:03 +08:00
..
minimal-ws-client-rx mbedtls: wrapper: client: Force mbedTLS to attemp to verify cert 2018-04-06 10:38:03 +08:00
minimal-ws-client-tx minimal: minimal-raw-file 2018-04-06 10:38:03 +08:00
README.md minimal: ws-client-tx and change dir names to match project name 2018-04-06 10:38:03 +08:00

name demonstrates
minimal-ws-client-rx Connects to the dumb-increment-protocol wss server at https://libwebsockets.org and demonstrates receiving ws data
minimal-ws-client-tx Connects to the minimal-ws-broker example as a publisher, demonstrating sending ws data