mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 07:28:13 +08:00
32 lines
728 B
C
32 lines
728 B
C
#pragma once
|
|
|
|
#include "config.h"
|
|
#include "log.h"
|
|
#include "url.h"
|
|
#include "util.h"
|
|
|
|
#if MG_TLS == MG_TLS_MBED
|
|
#include <mbedtls/debug.h>
|
|
#include <mbedtls/net_sockets.h>
|
|
#include <mbedtls/ssl.h>
|
|
#include <mbedtls/ssl_ticket.h>
|
|
|
|
struct mg_tls_ctx {
|
|
int dummy;
|
|
#ifdef MBEDTLS_SSL_SESSION_TICKETS
|
|
mbedtls_ssl_ticket_context tickets;
|
|
#endif
|
|
};
|
|
|
|
struct mg_tls {
|
|
mbedtls_x509_crt ca; // Parsed CA certificate
|
|
mbedtls_x509_crt cert; // Parsed certificate
|
|
mbedtls_pk_context pk; // Private key context
|
|
mbedtls_ssl_context ssl; // SSL/TLS context
|
|
mbedtls_ssl_config conf; // SSL-TLS config
|
|
#ifdef MBEDTLS_SSL_SESSION_TICKETS
|
|
mbedtls_ssl_ticket_context ticket; // Session tickets context
|
|
#endif
|
|
};
|
|
#endif
|