-
Notifications
You must be signed in to change notification settings - Fork 92
hmac,md5,sha: add mbedtls backend #871
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
Conversation
You have to include a
|
We had similar request here (not merged): |
#elif defi 8000 ned (MBEDTLS_MD_C) | ||
int err; | ||
|
||
err = mbedtls_sha1(d, n, md); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
int err
can be declared and assigned in the same operation.
You mean for building baresip? I added a
What is missing? |
re-config.cmake is for shared options, if its only libre related, |
Ah, okay. In this case mbedTLS is a static library. Linking to libre.so/libre.a should be enough. I hope, that I am thinking right now. |
Linking |
I think so. Thus And also a stub for |
Pre-condition: have built and installed mbedtls. E.g. I have
Build re:
Build the app, e.g. baresip:
@sreimers Is this the right way now? Are the assumptions in #871 (comment) correct? edit: There is another important question in baresip/baresip#2646 (comment) . |
I think its better to use if(USE_MBEDTLS)
find_package(MBEDTLS)
else()
find_package(OpenSSL "1.1.1")
endif() |
Thanks for writing this patch! The code looks fine to me, please merge to main if okay. |
Your welcome! I think @sreimers should merge if the cmake looks good to him. |
Thanks! |
We are evaluating re/baresip on Cortex M7/M4 with Zephyr.
First step is to build re without TLS support. But at least the hash functions needs an MbedTLS backend.
Build with: