Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls error when compiling on esp-idf 5 (CA-295) #134

Open
preveen-stack opened this issue May 22, 2023 · 4 comments
Open

tls error when compiling on esp-idf 5 (CA-295) #134

preveen-stack opened this issue May 22, 2023 · 4 comments

Comments

@preveen-stack
Copy link

I was tying to compile the sample application iothub_client_sample_mqtt with esp-idf 5.0.0 and is getting the below errors. Has anybody come across them?

esp5/esp-idf/esp-azure/port/src/tlsio_esp_tls.c:127:5: error: implicit declaration of function 'esp_tls_conn_delete'; did you mean 'esp_tls_conn_write'? [-Werror=implicit-function-declaration]
  127 |     esp_tls_conn_delete(tls_io_instance->esp_tls_handle);
      |     ^~~~~~~~~~~~~~~~~~~
      |     esp_tls_conn_write
/esp5/esp-idf/esp-azure/port/src/tlsio_esp_tls.c: In function 'tlsio_esp_tls_create':
/Users/preveen/esp5/esp-idf/esp-azure/port/src/tlsio_esp_tls.c:219:59: error: invalid application of 'sizeo' to incomplete type 'esp_tls_t' {aka 'struct esp_tls'}
  219 |                 result->esp_tls_handle = calloc(1, sizeof(esp_tls_t));
      |                                                           ^~~~~~~~~
@preveen-stack preveen-stack changed the title tls_error when compiling esp-idf 5 tls error when compiling on esp-idf 5 May 22, 2023
@dhammuabhi
Copy link

dhammuabhi commented May 26, 2023

Yes I too came accross this issue. Can anyone help me to solve this issue?

@github-actions github-actions bot changed the title tls error when compiling on esp-idf 5 tls error when compiling on esp-idf 5 (CA-295) May 26, 2023
@Rainbow-Cai
Copy link

Rainbow-Cai commented May 30, 2023

Hi There are no the "esp_tls_conn_delete()" functions in the v5.0 IDF SDK. Please refer to the “Function Deprecations And Recommended Alternatives” programming guide.
image

@dhammuabhi
Copy link

second issue still didn't resolve

/home/ubuntu22/esp/esp-azure/port/src/tlsio_esp_tls.c:220:59: error: invalid application of 'sizeof' to incomplete type 'esp_tls_t' {aka 'struct esp_tls'}
220 | result->esp_tls_handle = calloc(1, sizeof(esp_tls_t));
|

@someone42
Copy link

To anyone having this issue, the second error can be resolved by replacing the line:
result->esp_tls_handle = calloc(1, sizeof(esp_tls_t));
with:
result->esp_tls_handle = esp_tls_init();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants