-
Couldn't load subscription status.
- Fork 1.1k
Throw a warning when using the example signing/encryption keys #2352
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
Conversation
This is automatically disabled for pico-examples, and can be manually disabled by setting PICO_ALLOW_EXAMPLE_KEYS
| RESULT_VARIABLE compare_result | ||
| ) | ||
| if(compare_result EQUAL 0) | ||
| message(WARNING "${TARGET} is using a default ${TYPE} key - this must be changed before production") |
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.
Would there be any value in also having a PICO_FORBID_EXAMPLE_KEYS setting, which changes this WARNING to an ERROR ? 🤷
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.
Good use of CMake functionality, and I approve of the concept entirely.
Make doing the right thing easy, and the wrong thing hard.
This throws a CMake warning when the example signing/encryption keys from pico-examples are used to sign/encrypt a binary, as the user should replace these with their own keys when actually developing secure applications
This is automatically disabled for pico-examples (as that can use the example keys), and can be manually disabled by setting PICO_ALLOW_EXAMPLE_KEYS