How to run Mongoose HTTPS server
Posted: Sun Jul 02, 2017 10:16 am
Hi All!
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:
Here the definition of SSL_CTX_use_certificate_file():
So what the question: can I to use Mongoose HTTPS server without changing its implementation and, if can, how to do this?
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;
}