Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/esp-tls/private_include/esp_tls_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
#elif CONFIG_ESP_TLS_USING_WOLFSSL
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/openssl/x509.h"
#include "wolfssl/wolfcrypt/port/Espressif/esp_crt_bundle.h"
#include "private_include/esp_tls_wolfssl.h"
#endif

struct esp_tls {
Expand Down Expand Up @@ -74,6 +77,11 @@ struct esp_tls {
size_t client_session_len; /*!< Length of the serialized client session ticket context. */
#endif /* CONFIG_MBEDTLS_SSL_PROTO_TLS1_3 && CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS */
#elif CONFIG_ESP_TLS_USING_WOLFSSL
#ifndef WOLFSSL_NO_CONF_COMPATIBILITY
wolfssl_ssl_config conf;
void (*sync)(struct esp_tls*);
#endif

void *priv_ctx;
void *priv_ssl;
#endif
Expand Down
17 changes: 12 additions & 5 deletions components/esp-tls/private_include/esp_tls_wolfssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
#pragma once
#include "esp_tls.h"
#include "esp_tls_private.h"
#ifdef CONFIG_ESP_TLS_USING_WOLFSSL

/* wolfssl_ssl_config is ESP-IDF specific helper for Certificate Bundles */
#include "wolfssl/wolfcrypt/settings.h"
#include "wolfssl/ssl.h"
#include "wolfssl/openssl/x509.h"


/**
* Internal Callback for creating ssl handle for wolfssl
Expand Down Expand Up @@ -72,10 +79,7 @@ void *esp_wolfssl_get_ssl_context(esp_tls_t *tls);
/**
* wolfSSL function for Initializing socket wrappers (no-operation for wolfSSL)
*/
static inline void esp_wolfssl_net_init(esp_tls_t *tls)
{
}

void esp_wolfssl_net_init(esp_tls_t *tls);

/**
* Function to Create ESP-TLS Server session with wolfssl Stack
Expand All @@ -85,4 +89,7 @@ int esp_wolfssl_server_session_create(esp_tls_cfg_server_t *cfg, int sockfd, esp
/*
* Delete Server Session
*/
void esp_wolfssl_server_session_delete(esp_tls_t *tls);
int esp_wolfssl_server_session_delete(esp_tls_t *tls);


#endif /* CONFIG_ESP_TLS_USING_WOLFSSL */