In espidf 5.0.1 the TLS implementation of espidf provided the function int mbedtls_pk_load_file(const char path, unsigned char **buf, size_tn). It seems, this function seems no longer present in the newest version of the framework. I could not find any changelog for that and which function it is substituted by.
What new function should be used? I ported libssh2 in one of my projects and libssh2 uses this function. I would need to know how to adapt this.
espidf 5.3 mbedtls removed function (mbedtls_pk_load_file)?
-
- Posts: 24
- Joined: Wed Jul 06, 2022 8:36 am
Re: espidf 5.3 mbedtls removed function (mbedtls_pk_load_file)?
Hi @fschuetz,
A similar issue has been reported in the mbedtls issues as well, could you please take a look into this thread https://github.com/libssh2/libssh2/comm ... -141379351.
I think the crux of the above discussion is that the was always a private function but they had misplaced it in the public header, so they seem to now suggest using .
Thank you!
A similar issue has been reported in the mbedtls issues as well, could you please take a look into this thread https://github.com/libssh2/libssh2/comm ... -141379351.
I think the crux of the above discussion is that the
Code: Select all
mbedtls_pk_load_file()
Code: Select all
mbedtls_pk_parse_key()
Thank you!
Re: espidf 5.3 mbedtls removed function (mbedtls_pk_load_file)?
Thanks you very much for pointing in this direction. This is exactly the problem. I currently fixed it the same way as the libssh2 project just did: Force exposing the function in the mbedtls.c file of libssh2:
Ugly but it works. I might look into how to properly implement the function and offer the solution to libssh2, if they are not faster.
Code: Select all
/* Force-expose internal mbedTLS function */
#if MBEDTLS_VERSION_NUMBER >= 0x03060000
int mbedtls_pk_load_file(const char *path, unsigned char **buf, size_t *n);
#endif
Who is online
Users browsing this forum: Bing [Bot] and 85 guests