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

Integrate mbedTLS library to CHIP #357

Closed
pan-apple opened this issue Apr 14, 2020 · 5 comments · Fixed by #369
Closed

Integrate mbedTLS library to CHIP #357

pan-apple opened this issue Apr 14, 2020 · 5 comments · Fixed by #369
Assignees
Milestone

Comments

@pan-apple
Copy link
Contributor

Problem

CHIP project is lacking an implementation of mbedTLS.

Proposed Solution

There are the following solutions. We need to choose one of them

  1. nRF52, and EFR32 SDKs provide an implementation of mbedTLS. Use that for specific platforms. For native (Ubuntu/Darwin), use installed (apt-get/brew) version of mbedTLS.
  2. Clone https://github.com/ARMmbed/mbedtls to third_party/mbedTLS and build it for each platform.
@pan-apple pan-apple added this to the M4 milestone Apr 14, 2020
@pan-apple pan-apple self-assigned this Apr 14, 2020
@pan-apple
Copy link
Contributor Author

@rwalker-apple , @gerickson , @woody-apple any thoughts on this?

@rwalker-apple
Copy link
Contributor

rwalker-apple commented Apr 14, 2020

since we have autoconf, I recommend option 1

@gerickson
Copy link
Contributor

gerickson commented Apr 14, 2020

As a first pass, I'd take the same approach here that we take with OpenSSL, I think. Depending on whether it is required or not, add an NL_WITH_{OPTIONAL,REQUIRED}_EXTERNAL_PACKAGE to configure.ac. This means the system integrator needs to provide it.

If that's insufficient and we find we really need to, we can either make mbedTLS a repo.conf entry, snapping to a particular branch/commit/tag. This means the CHIP package can provide it by "reference" by default, but the system integrator can override it as above.

If that's insufficient, we can actually inline a copy. This means the CHIP package can provide it by "value" by default, but the system integrator can override it as above.

@pan-apple
Copy link
Contributor Author

Thanks @rwalker-apple , @gerickson. I'll go with the approach suggested above (option 1, with similar setup as OpenSSL as REQUIRED external package).

@pan-apple
Copy link
Contributor Author

pan-apple commented Apr 14, 2020

Seems mbedTLS does not have .pc file required by pkg-config. They have an issue opened ~5 years ago.

https://github.com/ARMmbed/mbedtls/issues/228

So pkg-config does not detect mbedtls installation

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

Successfully merging a pull request may close this issue.

3 participants