Skip to content

Conversation

@bigbrett
Copy link
Contributor

@bigbrett bigbrett commented Dec 4, 2025

  • Adds three new makefile variables (and some associated logic) to simplify building the test app using user-supplied keys or certificate chains
  • Fixes bug where RSA IMAGE_HEADER_SIZES were hardcoded, breaking compatibility with cert chain inclusion
  • adds two new .config files for wolfHSM with RSA4096, and makes associated CI and build system changes
  • Updates wolfHSM to latest

@bigbrett bigbrett force-pushed the simplify-external-certs branch 2 times, most recently from 73f87af to 91baf13 Compare December 5, 2025 00:50
@bigbrett bigbrett requested a review from Copilot December 5, 2025 00:51
@bigbrett bigbrett changed the title Simplify external certs Simplify handling of user-supplied keys and certs Dec 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the external certificate chain handling in wolfBoot by removing the CERT_CHAIN_GEN variable and introducing user-provided key/certificate variables (USER_PRIVATE_KEY, USER_PUBLIC_KEY, USER_CERT_CHAIN). The changes streamline the build system to auto-generate dummy certificate chains when needed, while allowing users to supply their own keys and certificates for production use.

Key Changes

  • Removed CERT_CHAIN_GEN flag; certificate chains are now auto-generated when CERT_CHAIN_VERIFY=1 is set without USER_CERT_CHAIN
  • Added USER_PRIVATE_KEY, USER_PUBLIC_KEY, and USER_CERT_CHAIN variables for user-provided cryptographic materials
  • Updated documentation to reflect the simplified workflow and new configuration options

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Makefile Added validation and logic for user-provided keys/certificates; simplified key selection flow
options.mk Replaced CERT_CHAIN_GEN with auto-generation logic based on USER_CERT_CHAIN presence
test-app/Makefile Removed unused RSA-specific IMAGE_HEADER_SIZE configuration
src/image.c Added conditional compilation guard for wolfHSM client key eviction
include/user_settings.h Extended conditional check to exclude RSA inline verification for wolfHSM modes
arch.mk Added NVM image generation support for simulator; made NVM config files overridable
docs/compile.md Added comprehensive documentation for key generation and user-provided key workflow
docs/Signing.md Added Makefile usage examples for certificate chain signing
docs/keystore.md Added reference to new key generation documentation
config/examples/*.config Removed CERT_CHAIN_GEN=1 from example configurations
lib/wolfHSM Updated submodule reference
tools/scripts/tc3xx/*.nvminit Updated NVM object ID for certificate chain

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bigbrett bigbrett force-pushed the simplify-external-certs branch from 91baf13 to 33a0dd0 Compare December 5, 2025 16:47
-various fixes for RSA4096
-remove erroneous coupling between SMALL_STACK and WOLFHSM_SERVER
@bigbrett bigbrett changed the title Simplify handling of user-supplied keys and certs Simplifications for user-supplied keys and certs; wolfHSM RSA4096 fixes Dec 6, 2025
@bigbrett bigbrett force-pushed the simplify-external-certs branch from 3764dd2 to b56d119 Compare December 6, 2025 01:44
@bigbrett bigbrett marked this pull request as ready for review December 6, 2025 01:45
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.

1 participant