mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-08 21:46:54 +08:00
6a3d01ee6b
PUBLISHED_FROM=cf49d0d345e4a7607c535f9578b8ed4160f2fccd
22 lines
749 B
Markdown
22 lines
749 B
Markdown
---
|
|
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);
|
|
---
|
|
|
|
Note: This function is deprecated, please use SSL options in mg_connect_opt.
|
|
|
|
Enable 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.
|
|
Certificate files must be in PEM format. 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.
|
|
|