Skip to content

Conversation

@teejusb
Copy link
Contributor

@teejusb teejusb commented May 8, 2024

This PR removes the define introduced in #514, in favor of just version checking the MbedTLS (defined here). I think this implementation is more portable as any projects dependent on this change can get it immediately when updating their MbedTLS library, instead of manually adding in a new define.


Details

It looks like brew updated their mbedtls version 2 months ago as per this link.

This update happened on March 28th, while the last IXWebSocket update before this changed happened one day earlier on March 27th.

Since there hadn't been any updates to this repo after March 28th, the GitHub action was not run. And since the failing test uses brew install mbedtls here, it is now getting version 3.6.0, instead of 3.5.2. I think this implies that even without the changes in #514, the runner would have started to fail on the next PR.

Interestingly, and also unknowingly, the changes in #514 were created to address exactly this issue :) The changes in my project to enable IXWebSocket to use that PR can be found here.

@teejusb teejusb marked this pull request as draft May 8, 2024 15:58
@teejusb teejusb changed the title Set IXWEBSOCKET_MBEDTLS_USE_PSA_CRYPTO for testing Version check MbedTLS instead of introducing a new define May 8, 2024
@teejusb teejusb changed the title Version check MbedTLS instead of introducing a new define Version check MbedTLS instead of introducing a new define when initializing PSA Crypto API May 8, 2024
@teejusb teejusb marked this pull request as ready for review May 8, 2024 16:23
#if defined(IXWEBSOCKET_MBEDTLS_USE_PSA_CRYPTO)
psa_crypto_init();
#endif
if (MBEDTLS_VERSION_MAJOR >= 3 && MBEDTLS_VERSION_MINOR >= 6 && MBEDTLS_VERSION_PATCH >= 0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can also add guards for MBEDTLS_VERSION_MAJOR etc if you'd like. I figured this would be a safe assumption so I opted to leave them out.

@bsergean bsergean merged commit c27f5a9 into machinezone:master May 8, 2024
@bsergean
Copy link
Contributor

bsergean commented May 8, 2024

thanks !

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 this pull request may close these issues.

2 participants