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

Fix compile errors when MBEDTLS_HAVE_TIME is not defined #3444

Conversation

raoulstrackx
Copy link
Contributor

When the library was being compiled without MBEDTLS_HAVE_TIME defined, it resulted in compile errors. This commit fixes those problems

@gilles-peskine-arm gilles-peskine-arm added bug component-platform Portability layer and build scripts labels Jun 23, 2020
@gilles-peskine-arm gilles-peskine-arm added the needs-backports Backports are missing or are pending review and approval. label Jun 23, 2020
@gilles-peskine-arm
Copy link
Contributor

gilles-peskine-arm commented Jun 23, 2020

  • Please add a changelog entry file under Changelog.d.
  • Apparently there are also build errors in X.509 code. This pull request is complementary with Fix ssl_context_info.c to correctly check for EOF - type-limit bug #3449. It would be great if you could synchronize with @naynajain to fix the problem everywhere.
  • To avoid the problem coming up again, there should be a build in tests/scripts/all.sh with MBEDTLS_HAVE_TIME disabled but other options enabled. Currently, I think all the builds with MBEDTLS_HAVE_TIME disabled are variants of the baremetal configuration. Would you mind investigating why this build doesn't catch the problems here, and adding a configuration that does catch the problem, so that we have a non-regression test?

@gilles-peskine-arm
Copy link
Contributor

The Mbed OS CI is failing for unrelated reasons at the moment, so you can ignore failures of the Mbed OS CI jobs.

@naynajain
Copy link
Contributor

* Please add a changelog entry file under `Changelog.d`.

* Apparently there are also build errors in X.509 code. This pull request is complementary with #3449. It would be great if you could synchronize with @naynajain to fix the problem everywhere.

Hi,

Gilles referred to your PR as it seems one of my commit in my PR 3449 is fixing same issue as submitted by your PR ? How would you want to go about it ?

Thanks & Regards,
- Nayna

@daxtens
Copy link
Contributor

daxtens commented Aug 7, 2020

Hi, I've been working with @naynajain and I'd like to help land this.

I looked into the non-regression test. It's tricky. To pick up the bug we found, we need a build with !defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_X509_CRT_PARSE_C), and we need including time.h to fail. scripts/config.py baremetal generates a suitable config, but because we're building on a real system that does have time.h, everything still builds. I'm working on a better test for this that set up a fake include directory.

@raoulstrackx
Copy link
Contributor Author

Hi @daxtens, @naynajain, sorry for the late response, I've just come back from holiday. I don't have many cycles to burn, but I'd like to help/learn.

@daverodgman daverodgman added Community needs-reviewer This PR needs someone to pick it up for review and removed needs-reviewer This PR needs someone to pick it up for review labels Oct 2, 2020
@daverodgman daverodgman added the needs-adoption stalled PR that someone should pick up and complete label Jul 6, 2021
@yanesca yanesca removed the needs-adoption stalled PR that someone should pick up and complete label Sep 3, 2021
@daverodgman daverodgman added the needs-adoption stalled PR that someone should pick up and complete label Sep 28, 2021
@daverodgman daverodgman removed the needs-adoption stalled PR that someone should pick up and complete label Oct 4, 2021
@tom-cosgrove-arm
Copy link
Contributor

Closing this PR as these changes are being does as part of #3624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-platform Portability layer and build scripts needs-backports Backports are missing or are pending review and approval. needs-work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants