I have been reviewing all information that I can get on HTTPS client operation in Mongoose OS, and I cannot find a conclusive way to connect to an HTTPS web site. There are several partial examples, some with broken links in the old forum. An up to date example would be a really great thing.
Among the questions:
-
How to frame up an HTTPS connection with the helper function (i. e. which one to use: mg_connect_http or mg_connect_http_opts, ) and how are these function calls formed up.)
-
What client CA information is required? It seems to me that in the general case, an HTTPS client MUST be able to provide Server Certificate verification with a CA supplied certificate. Since an embedded client is unlikely to be required to behave like a browser, it is probably sufficient only to get a copy of the certificate for the site or sites that the embedded client is going to access. A practical example would be most welcome.
Thanks for your help,
JSW