Add option --enable-baremetal and WOLFSSL_BAREMETAL macro#9460
Add option --enable-baremetal and WOLFSSL_BAREMETAL macro#9460dgarske wants to merge 5 commits intowolfSSL:masterfrom
--enable-baremetal and WOLFSSL_BAREMETAL macro#9460Conversation
- Remove WOLFCRYPT_ONLY from WOLFSSL_BAREMETAL macro Users should enable it separately via --enable-cryptonly - Make NO_ASN_TIME conditional on WOLFCRYPT_ONLY Only define NO_ASN_TIME when WOLFCRYPT_ONLY is already defined Add comment explaining this is for systems without RTC This allows users to use --enable-baremetal for bare-metal builds without forcing crypto-only mode, while still providing the option to disable certificate date checking when building crypto-only. Co-Authored-By: jack@wolfssl.com <jack@wolfssl.com>
|
Jenkins retest this please |
|
For FIPS purposes, baremetal is a scary term that labs and CMVP won't touch. 99.9% of the time systems that would require this setting will actually have Firmware present and won't be truely and completely "baremetal". This configure option is great for cases where FIPS doesn't matter but if we want to use this feature set on a system with primitive Firmware that isn't truely and completely "baremetal" it would be nice to have an alias that won't scare the CMVP and the CSTL's when they see it in the Module Management Manual or User Guide as we call it. An alias like |
|
Closing PR. @jackctj117 will you make sure the wolfssl/documentation user manual has a section for bare-metal and build options that are useful for that environment? |
Description
Adds
--enable-baremetalconfigure option andWOLFSSL_BAREMETALmacro to simplify configuration for bare-metal embedded systems. This option encapsulates commonly-used defines for bare-metal environments into a single flag.The
WOLFSSL_BAREMETALmacro defines:SINGLE_THREADED- No threading supportNO_DEV_RANDOM- No /dev/random accessNO_FILESYSTEM- No file system accessNO_WRITEV- No writev() system callNO_STDIO_FILESYSTEM- No stdio-based file operationsWOLFSSL_NO_SOCK- No socket supportWOLFSSL_NO_GETPID- No process ID supportNO_ASN_TIME- Conditionally defined only whenWOLFCRYPT_ONLYis also defined. For systems without RTC, this bypasses certificate date checking.Important: Users must provide their own entropy source when using this configuration since
NO_DEV_RANDOMis defined. Implementwc_GenerateSeed()with platform-specific hardware RNG.Changes based on reviewer feedback:
WOLFCRYPT_ONLYfrom the macro - users should enable it separately via--enable-cryptonlyif neededNO_ASN_TIMEconditional onWOLFCRYPT_ONLYto avoid forcing certificate date checking to be disabledTesting
Tested with autotools build system:
Tested with both flags:
Tested with CMake build system:
Verified that
WOLFSSL_BAREMETALin settings.h correctly defines all component macros when enabled, and thatNO_ASN_TIMEis only defined whenWOLFCRYPT_ONLYis also present.Checklist