Skip to content

Conversation

@will-v-pi
Copy link
Contributor

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

This is automatically disabled for pico-examples, and can be manually disabled by setting PICO_ALLOW_EXAMPLE_KEYS
@will-v-pi will-v-pi added this to the 2.1.2 milestone Mar 14, 2025
RESULT_VARIABLE compare_result
)
if(compare_result EQUAL 0)
message(WARNING "${TARGET} is using a default ${TYPE} key - this must be changed before production")
Copy link
Contributor

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 ? 🤷

tdewey-rpi
tdewey-rpi previously approved these changes Mar 18, 2025
Copy link

@tdewey-rpi tdewey-rpi left a 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.

@kilograham kilograham merged commit f81851a into raspberrypi:develop Mar 22, 2025
4 checks passed
will-v-pi added a commit to raspberrypi/pico-examples that referenced this pull request Mar 26, 2025
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.

4 participants