mongoose/docs/c-api/net.h/mg_set_ssl.md
Dmitry Frank 849ec1684a Apply Mongoose docs edits by Ev
PUBLISHED_FROM=5cd78790a03580aa23dd3d2d8b825ad449083cc2
2016-07-26 15:06:04 +00:00

756 B

title decl_name symbol_kind signature
mg_set_ssl() mg_set_ssl func const char *mg_set_ssl(struct mg_connection *nc, const char *cert, const char *ca_cert);

Note: This function is deprecated. Please, use SSL options in mg_connect_opt.

Enables SSL for a given connection. cert is a server certificate file name for a listening connection or a client certificate file name for an outgoing connection. The certificate files must be in PEM format. The server certificate file must contain a certificate, concatenated with a private key, optionally concatenated with DH parameters. ca_cert is a CA certificate or NULL if peer verification is not required. Return: NULL on success or error message on error.