I'm trying to run a HTTPS server and I already run up HTTP version.
After that I found example in Mongoose official docs https://docs.cesanta.com/mongoose/master/#/http/ssl.md/ and also see pcbreflux example of ssl_webserver. I was alert to various methods of certification and key specifying and I start walk down in Mongoose method:
Code: Select all
mg_bind_opt() -> mg_ssl_if_conn_init() -> mg_use_cert() -> SSL_CTX_use_certificate_file()
Code: Select all
int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
{
return 0;
}