Skip to content

Fixed compilation on windows when MBEDTLS_HAVE_TIME is disabled but MBEDTLS_FS_IO is enabled #10126

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Cryru
Copy link

@Cryru Cryru commented Apr 10, 2025

x509_crt does not compile when the MBEDTLS_HAVE_TIME option is disabled and the MBEDTLS_FS_IO is enabled because the windows.h header isn't included and MAX_PATH and other symbols (usage: mbedtls_x509_crt_parse_path) cannot be found.

@irwir
Copy link
Contributor

irwir commented Apr 11, 2025

In case of failure it makes sense to provide the complete environment information: library version or commit, configuration, compiler.

It seems my tests with the current development head were not clean enough, because winsock2.h had been already added into one of the build_info.h files as a part of preparation for a different PR.
With this change your patch would not be needed, though might make sense for backporting.

@ronald-cron-arm
Copy link
Contributor

Thanks for this, it seems that we indeed miss in x509_crt.c the inclusion of windows.h when MBEDTLS_FS_IO is enabled and MBEDTLS_HAVE_TIME disabled.

@Cryru Cryru force-pushed the development branch 2 times, most recently from d6b8c85 to 57b68c1 Compare April 17, 2025 05:09
@Cryru
Copy link
Author

Cryru commented Apr 17, 2025

Added the requested changes and DCO.

…BEDTLS_FS_IO is enabled

Signed-off-by: Vlad Abadzhiev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants