multiple same name macros defined into embedTLS Header File

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

multiple same name macros defined into embedTLS Header File

Postby Ritesh » Thu May 18, 2017 10:49 am

Hi,

We are planning to use embedTLS components from ESP32 IDF 2.0 Official Release and we have included one "compat-1.3h" file.

So, We are getting multiple re-definition of one macro ssl_set_bio form that header file. So, We have checked that header file and found following 2 lines.

Code: Select all

#define ssl_set_bio mbedtls_ssl_set_bio
#define ssl_set_bio mbedtls_ssl_set_bio_timeout
I think it should be something like this.

Code: Select all

#define ssl_set_bio mbedtls_ssl_set_bio
#define ssl_set_bio_timeout mbedtls_ssl_set_bio_timeout
Let me know if i am wrong.
Regards,
Ritesh Prajapati

f.h-f.s.
Posts: 214
Joined: Thu Dec 08, 2016 2:53 pm

Re: multiple same name macros defined into embedTLS Header File

Postby f.h-f.s. » Thu May 18, 2017 4:20 pm

Are you sure you should be using compat-1.3.h? It is deprecated and not included in any files in esp-idf, as far as I can see. What do you need it for?

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: multiple same name macros defined into embedTLS Header File

Postby Ritesh » Thu May 18, 2017 5:10 pm

f.h-f.s. wrote:Are you sure you should be using compat-1.3.h? It is deprecated and not included in any files in esp-idf, as far as I can see. What do you need it for?
Yes. But, We have included that file from application and we are using ESP-IDF 2.0 official Release.

We have some requirement to include that file and that file is present with that macros into current master ESP32 IDF RTOS SDK.
Regards,
Ritesh Prajapati

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: multiple same name macros defined into embedTLS Header File

Postby ESP_Angus » Fri May 19, 2017 7:12 am

This change looks correct. To be very clear, the compat-1.3.h header is included in mbedTLS for backwards compatibility with polarSSL, mbedTLS's predecessor, which was discontinued in 2014 (the last 1.3 releases were in mid-2014).

If you're not working with third party code that only works with polarSSL, I strongly recommend not including any "compat-xxx.h" headers. Use the regular mbedTLS headers instead.

Regarding this specific change, it looks like the upstream mbedTLS project has fixed this recently. We'll update to their latest release soon and integrate this fix.

Ritesh
Posts: 1365
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: multiple same name macros defined into embedTLS Header File

Postby Ritesh » Fri May 19, 2017 5:08 pm

ESP_Angus wrote:This change looks correct. To be very clear, the compat-1.3.h header is included in mbedTLS for backwards compatibility with polarSSL, mbedTLS's predecessor, which was discontinued in 2014 (the last 1.3 releases were in mid-2014).

If you're not working with third party code that only works with polarSSL, I strongly recommend not including any "compat-xxx.h" headers. Use the regular mbedTLS headers instead.

Regarding this specific change, it looks like the upstream mbedTLS project has fixed this recently. We'll update to their latest release soon and integrate this fix.
Ok. No issues.

Just keep in mind to solve it into next SDK release.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 99 guests