Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

mg_connect_opt not validating schema before creating connection.

When ssl parameters are passed to mg_connect_ws_opt and scheme type is "ws", mongoose webserver tries to make ssl connected instead of normal http connection. The method mg_connect_opt() ignores schema.

struct mg_connect_opts opts;
opts.user_data = NULL;
opts.ssl_cert = NULL;
opts.ssl_key = NULL;
opts.ssl_ca_cert = CA_BUNDLE_PATH;
opts.ssl_server_name = "*";
webSocketConnection = mg_connect_ws_opt( &eventMangaer, webSocketClientEventHandler, opts, "ws://0.0.0.0:8123", NULL, NULL );

Comments

Sign In or Register to comment.