2016-05-12 04:36:12 +08:00
|
|
|
---
|
|
|
|
title: "mg_set_ssl()"
|
|
|
|
decl_name: "mg_set_ssl"
|
|
|
|
symbol_kind: "func"
|
|
|
|
signature: |
|
|
|
|
const char *mg_set_ssl(struct mg_connection *nc, const char *cert,
|
|
|
|
const char *ca_cert);
|
|
|
|
---
|
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
Note: This function is deprecated. Please, use SSL options in
|
|
|
|
mg_connect_opt.
|
2016-06-09 19:00:14 +08:00
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
Enables SSL for a given connection.
|
|
|
|
`cert` is a server certificate file name for a listening connection
|
2016-05-12 04:36:12 +08:00
|
|
|
or a client certificate file name for an outgoing connection.
|
2016-07-26 22:53:33 +08:00
|
|
|
The certificate files must be in PEM format. The server certificate file
|
2016-05-12 04:36:12 +08:00
|
|
|
must contain a certificate, concatenated with a private key, optionally
|
2016-06-09 19:00:14 +08:00
|
|
|
concatenated with DH parameters.
|
2016-07-26 22:53:33 +08:00
|
|
|
`ca_cert` is a CA certificate or NULL if peer verification is not
|
2016-05-12 04:36:12 +08:00
|
|
|
required.
|
2016-07-26 22:53:33 +08:00
|
|
|
Return: NULL on success or error message on error.
|
2016-05-12 04:36:12 +08:00
|
|
|
|