-
Notifications
You must be signed in to change notification settings - Fork 3k
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
LoRaWAN LoRaMacCrypto.cpp Asserts Incorrect #6764
Comments
@AnttiKauppila @hasnainvirk Please review |
Arm internal ref: IOTCELL-841 |
Good finding. We'll fix this. I think MBED_STATIC_ASSERT is even better to detect the issue already during the compilation. |
If you are going to make it a compile time failure you could get rid of all the stub functions and add an #error directive. The implication of these stubs and comments in the code is that there could be a use-case for LoRaWAN without mbedTLS but I can't think what that use-case could be. |
This is not possible after all. We must be able to build mbed-os even when lora/mbedlts is not used. |
@mattbrown015 Are you happy with the PR relating to your issue ? It will be made available in next minor release ASAP. |
I'm happy if you're happy! :-) The changes in LoRaMacCrypto.cpp look like what I was expecting and the LoRaWAN stack still works with MbedTLS included. But, I haven't investigated what happens in the various problem cases i.e. MbedTLS incorrectly configured. |
Do you want me to close this? Is it my job to close it as I opened it? |
@mattbrown015 yes, please close this issue. |
Description
'features\lorawan\lorastack\mac\LoRaMacCrypto.cpp' contains some asserts that should fire if mbedtls is incorrectly configured e.g.:
I think these should actually be something like:
I made a mistake with my configuration and I think I would have diagnosed the problem faster if the asserts had fired.
Bug
mbed-os sha:
c8d72c5 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #6693 from kjbracey-arm/equeue-ticks
Expected behavior
Assert with incorrect mbedtls configuration.
Actual behavior
Returns failure code.
Steps to reproduce
Disable mbedtls while using the LoRaWAN stack.
The text was updated successfully, but these errors were encountered: