mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-16 08:43:17 +00:00
Improve documentation, add TLS stuff
This commit is contained in:
parent
9b6192bd65
commit
3266511ebb
@ -2082,6 +2082,7 @@ PREDEFINED = __DOXYGEN__=1 \
|
|||||||
LWIP_IGMP=1 \
|
LWIP_IGMP=1 \
|
||||||
LWIP_TCP=1 \
|
LWIP_TCP=1 \
|
||||||
LWIP_ALTCP=1 \
|
LWIP_ALTCP=1 \
|
||||||
|
LWIP_ALTCP_TLS=1 \
|
||||||
LWIP_IPV6_SCOPES=1 \
|
LWIP_IPV6_SCOPES=1 \
|
||||||
TCP_LISTEN_BACKLOG=1 \
|
TCP_LISTEN_BACKLOG=1 \
|
||||||
LWIP_SNMP=1 \
|
LWIP_SNMP=1 \
|
||||||
@ -2118,7 +2119,8 @@ PREDEFINED = __DOXYGEN__=1 \
|
|||||||
SO_REUSE=1 \
|
SO_REUSE=1 \
|
||||||
SO_REUSE_RXTOALL=1 \
|
SO_REUSE_RXTOALL=1 \
|
||||||
LWIP_HAVE_SLIPIF=1 \
|
LWIP_HAVE_SLIPIF=1 \
|
||||||
LWIP_6LOWPAN=1
|
LWIP_6LOWPAN=1 \
|
||||||
|
HTTPD_ENABLE_HTTPS=1
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
# tag can be used to specify a list of macro names that should be expanded. The
|
# tag can be used to specify a list of macro names that should be expanded. The
|
||||||
|
@ -2593,6 +2593,11 @@ httpd_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if HTTPD_ENABLE_HTTPS
|
#if HTTPD_ENABLE_HTTPS
|
||||||
|
/**
|
||||||
|
* @ingroup httpd
|
||||||
|
* Initialize the httpd: set up a listening PCB and bind it to the defined port.
|
||||||
|
* Also set up TLS connection handling (HTTPS).
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
httpd_inits(struct altcp_tls_config *conf)
|
httpd_inits(struct altcp_tls_config *conf)
|
||||||
{
|
{
|
||||||
|
@ -367,6 +367,11 @@ smtp_set_server_port(u16_t port)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
||||||
|
/** @ingroup smtp
|
||||||
|
* Set TLS configuration for next SMTP connection
|
||||||
|
*
|
||||||
|
* @param tls_config TLS configuration
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
smtp_set_tls_config(struct altcp_tls_config *tls_config)
|
smtp_set_tls_config(struct altcp_tls_config *tls_config)
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
* @file
|
* @file
|
||||||
* Application layered TCP/TLS connection API (to be used from TCPIP thread)
|
* Application layered TCP/TLS connection API (to be used from TCPIP thread)
|
||||||
*
|
*
|
||||||
|
* @defgroup altcp_tls TLS layer
|
||||||
|
* @ingroup altcp
|
||||||
* This file contains function prototypes for a TLS layer.
|
* This file contains function prototypes for a TLS layer.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -51,13 +53,26 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/** @ingroup altcp_tls
|
||||||
|
* ALTCP_TLS configuration handle, content depends on port (e.g. mbedtls)
|
||||||
|
*/
|
||||||
struct altcp_tls_config;
|
struct altcp_tls_config;
|
||||||
|
|
||||||
|
/** @ingroup altcp_tls
|
||||||
|
* Create an ALTCP_TLS server configuration handle
|
||||||
|
*/
|
||||||
struct altcp_tls_config *altcp_tls_create_config_server_privkey_cert(const u8_t *privkey, size_t privkey_len,
|
struct altcp_tls_config *altcp_tls_create_config_server_privkey_cert(const u8_t *privkey, size_t privkey_len,
|
||||||
const u8_t *privkey_pass, size_t privkey_pass_len,
|
const u8_t *privkey_pass, size_t privkey_pass_len,
|
||||||
const u8_t *cert, size_t cert_len);
|
const u8_t *cert, size_t cert_len);
|
||||||
|
|
||||||
|
/** @ingroup altcp_tls
|
||||||
|
* Create an ALTCP_TLS client configuration handle
|
||||||
|
*/
|
||||||
struct altcp_tls_config *altcp_tls_create_config_client(const u8_t *cert, size_t cert_len);
|
struct altcp_tls_config *altcp_tls_create_config_client(const u8_t *cert, size_t cert_len);
|
||||||
|
|
||||||
|
/** @ingroup altcp_tls
|
||||||
|
* Create new ALTCP_TLS layer
|
||||||
|
*/
|
||||||
struct altcp_pcb *altcp_tls_new(struct altcp_tls_config* config, struct altcp_pcb *inner_pcb);
|
struct altcp_pcb *altcp_tls_new(struct altcp_tls_config* config, struct altcp_pcb *inner_pcb);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -79,6 +79,7 @@ struct mqtt_connect_client_info_t {
|
|||||||
u8_t will_qos;
|
u8_t will_qos;
|
||||||
u8_t will_retain;
|
u8_t will_retain;
|
||||||
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
#if LWIP_ALTCP && LWIP_ALTCP_TLS
|
||||||
|
/** TLS configuration for secure connections */
|
||||||
struct altcp_tls_config *tls_config;
|
struct altcp_tls_config *tls_config;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user