Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

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://", NULL, NULL );


Sign In or Register to comment.