Open gl-liuqingbo opened 1 month ago
E (23092) esp-tls-mbedtls: mbedtls_pk_parse_keyfile returned -0x1280
E (23092) esp-tls-mbedtls: Failed to set client pki context
E (23092) esp-tls-mbedtls: Failed to set client configurations, returned [0x8019] (ESP_ERR_MBEDTLS_PK_PARSE_KEY_FAILED)
E (23112) esp-tls: create_ssl_handle failed
E (23112) esp-tls: Failed to open new connection
E (23122) transport_base: Failed to open a new connection
E (23132) mqtt_client: Error transport connect
Hello, is there any relevant help, I would be greatly appreciated
Hi @gl-liuqingbo from the error you have issues in your key file. Mbedtls error indicates that you have an unsupported algorithm.
@euripedesrocha Thank you for your reply. I used openssl to generate the key through common RSA. My esp32s3 was able to parse the certificate without encrypting the key, but was unable to parse the certificate when encrypting the key. And this certificate can be successfully resolved when I use mosquitto mqtt client. I am very confused, is my esp32s3 missing any configuration?
I would check the encryption algorithm used and if it is supported in mbedtls.
Answers checklist.
General issue report
你好,我在 esp-idf/tools/test_apps/protocols/mqtt/publish_connect_test 例程下,修改ca.crt,client_pwd.crt,client_pwd.key为自签名的证书,也修改mqtt_cfg.credentials.authentication.key_password为密钥的密码,然后连接本地的mqtt服务器,但是一直得到这样的错误:
我的证书和密钥是没问题的,这一点我在使用另一个mqtt客户端时候验证过了。 我注意到当tls调用mbedtls_pk_parse_keyfile时,返回了MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG这样的错误,我不知道是当前esp-tls还不支持密钥密码的模式,还是说我缺少了某些配置?希望得到解答