You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ESP32S3(ESP-IDF V5.1.2)HTTPS连接故障排查求助

ESP32S3 + ESP-IDF V5.1.2 HTTPS连接异常排查

使用ESP32S3搭配ESP-IDF V5.1.2开发时,HTTP URL访问正常,但HTTPS URL访问报错。

初始错误日志

E (55888) esp-tls-mbedtls: No server verification option set in esp_tls_cfg_t structure. Check esp_tls API reference
E (55889) esp-tls-mbedtls: Failed to set client configurations, returned [0x8017] (ESP_ERR_MBEDTLS_SSL_SETUP_FAILED)
E (55900) esp-tls: create_ssl_handle failed
E (55905) esp-tls: Failed to open new connection
E (55910) transport_base: Failed to open a new connection
E (55919) HTTP_CLIENT: Connection failed, sock < 0
E (55922) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT

添加CA证书后的错误日志

E (128542) esp-tls-mbedtls: mbedtls_ssl_handshake returned -0x6C00
I (128543) esp-tls-mbedtls: Certificate verified.
E (128544) esp-tls: Failed to open new connection
E (128549) transport_base: Failed to open a new connection
E (128559) HTTP_CLIENT: Connection failed, sock < 0
E (128561) HTTP_CLIENT: Failed to open HTTP connection: ESP_ERR_HTTP_CONNECT

错误码定义

在IDF中查询到-0x6C00对应的定义:

/** Internal error (eg, unexpected failure in lower-level module) */
#define MBEDTLS_ERR_SSL_INTERNAL_ERROR                    -0x6C00

疑问

  • 是否是CA证书的生成方式有误?正确的生成方式是什么?
  • 还需要配置哪些参数才能实现带CA证书的HTTPS连接?

内容的提问来源于stack exchange,提问作者marshal clock

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.20 08:02:05