-
Notifications
You must be signed in to change notification settings - Fork 3k
Add checks for NULL_ENTROPY and SSL_TLS in mbed OS #3088
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
Add checks for NULL_ENTROPY and SSL_TLS in mbed OS #3088
Conversation
@sbutcher-arm @yanesca |
c789822
to
2227b9d
Compare
|
||
#if defined(MBEDTLS_TEST_NULL_ENTROPY) | ||
#warning "MBEDTLS_TEST_NULL_ENTROPY is enabled, the application will " \ | ||
"not be secure! Please implement hardware entropy for your platform" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the warning to:
WARNING! MBEDTLS_TEST_NULL_ENTROPY has been enabled. This configuration is not secure and is not suitable for production use.
#if defined(MBEDTLS_SSL_TLS_C) && !defined(MBEDTLS_TEST_NULL_ENTROPY) && \ | ||
!defined(MBEDTLS_ENTROPY_HARDWARE_ALT) | ||
#error "MBEDTLS_SSL_TLS_C defined, but not all prerequisites" | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the error text to:
No entropy source was found at build time, so TLS functionality is not available.
2227b9d
to
509a72c
Compare
LGTM. |
/morph test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for the warning
retest uvisor |
Result: FAILUREYour command has finished executing! Here's what you wrote!
Outputmbed Build Number: 926 Test failed! |
Description
Add preprocessor checks to mbed TLS through the importer scripts to ensure that compilation fails for targets that attempt to use SSL or entropy, but these are not supported by the target.
Status
READY
Migrations
NO
Todos
Deploy notes
This causes build errors while trying to build applications that require SSL or entropy sources but the target does not support it.