Skip to content

Commit 559e554

Browse files
committed
Merge branch 'contrib/github_pr_14503' into 'master'
feat(esp-tls): add option to enable/disable the full set of OCSP checks for wolfSSL (GitHub PR) Closes IDFGH-13619 See merge request espressif/esp-idf!33700
2 parents 1635905 + ba27281 commit 559e554

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

components/esp-tls/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,12 @@ menu "ESP-TLS"
106106
help
107107
Enable detailed debug prints for wolfSSL SSL library.
108108

109+
config ESP_TLS_OCSP_CHECKALL
110+
bool "Enabled full OCSP checks for ESP-TLS"
111+
depends on ESP_TLS_USING_WOLFSSL
112+
default y
113+
help
114+
Enable a fuller set of OCSP checks: checking revocation status of intermediate certificates,
115+
optional fallbacks to CRLs, etc.
116+
109117
endmenu

components/esp-tls/esp_tls_wolfssl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,12 @@ static esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls
316316
}
317317

318318
#ifdef CONFIG_WOLFSSL_HAVE_OCSP
319+
int ocsp_options = 0;
320+
#ifdef ESP_TLS_OCSP_CHECKALL
321+
ocsp_options |= WOLFSSL_OCSP_CHECKALL;
322+
#endif
319323
/* enable OCSP certificate status check for this TLS context */
320-
if ((ret = wolfSSL_CTX_EnableOCSP((WOLFSSL_CTX *)tls->priv_ctx, WOLFSSL_OCSP_CHECKALL)) != WOLFSSL_SUCCESS) {
324+
if ((ret = wolfSSL_CTX_EnableOCSP((WOLFSSL_CTX *)tls->priv_ctx, ocsp_options)) != WOLFSSL_SUCCESS) {
321325
ESP_LOGE(TAG, "wolfSSL_CTX_EnableOCSP failed, returned %d", ret);
322326
return ESP_ERR_WOLFSSL_CTX_SETUP_FAILED;
323327
}

0 commit comments

Comments
 (0)