diff --git a/components/esp-tls/esp_tls_wolfssl.c b/components/esp-tls/esp_tls_wolfssl.c index 7bad5e14d5fb..8cbe20c77814 100644 --- a/components/esp-tls/esp_tls_wolfssl.c +++ b/components/esp-tls/esp_tls_wolfssl.c @@ -310,6 +310,14 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls #endif /* CONFIG_WOLFSSL_HAVE_ALPN */ } +#ifdef CONFIG_WOLFSSL_HAVE_OCSP + wolfSSL_CTX_EnableOCSPStapling((WOLFSSL_CTX *)tls->priv_ctx ); + wolfSSL_UseOCSPStapling((WOLFSSL *)tls->priv_ssl, WOLFSSL_CSR_OCSP, 0); + wolfSSL_CTX_EnableOCSP((WOLFSSL_CTX *)tls->priv_ctx, 0); +#endif + + wolfSSL_CTX_UseSNI(tls->priv_ctx, WOLFSSL_SNI_HOST_NAME, hostname, hostlen); + wolfSSL_set_fd((WOLFSSL *)tls->priv_ssl, tls->sockfd); return ESP_OK; }