mongoose/docs/c-api/net.h/struct_mg_bind_opts.md
Deomid Ryabkov 67626d49c9 Add ssl_cipher_suites to mg_{bind,connect}_opts
Optional specification of SSL/TLS cipher suites.

PUBLISHED_FROM=e8968c6c7a92f10514d3ee575c2fb9be862e6cf8
2017-01-09 23:53:00 +00:00

45 lines
1.5 KiB
Markdown

---
title: "struct mg_bind_opts"
decl_name: "struct mg_bind_opts"
symbol_kind: "struct"
signature: |
struct mg_bind_opts {
void *user_data; /* Initial value for connection's user_data */
unsigned int flags; /* Extra connection flags */
const char **error_string; /* Placeholder for the error string */
struct mg_iface *iface; /* Interface instance */
#if MG_ENABLE_SSL
/*
* SSL settings.
*
* Server certificate to present to clients or client certificate to
* present to tunnel dispatcher (for tunneled connections).
*/
const char *ssl_cert;
/* Private key corresponding to the certificate. If ssl_cert is set but
* ssl_key is not, ssl_cert is used. */
const char *ssl_key;
/* CA bundle used to verify client certificates or tunnel dispatchers. */
const char *ssl_ca_cert;
/* Colon-delimited list of acceptable cipher suites.
* Names depend on the library used, for example:
*
* ECDH-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256 (OpenSSL)
* TLS-ECDH-ECDSA-WITH-AES-128-GCM-SHA256:TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
* (mbedTLS)
*
* For OpenSSL the list can be obtained by running "openssl ciphers".
* For mbedTLS, names can be found in library/ssl_ciphersuites.c
* If NULL, a reasonable default is used.
*/
const char *ssl_cipher_suites;
#endif
};
---
Optional parameters to `mg_bind_opt()`.
`flags` is an initial `struct mg_connection::flags` bitmask to set,
see `MG_F_*` flags definitions.