|
53 | 53 | ifeq ($(filter $(CONFIG),c asm bare),) |
54 | 54 | $(error CONFIG must be one of: c | asm | bare) |
55 | 55 | endif |
56 | | -ifeq ($(filter $(TARGET),test bench dhuk stsaes ccb ccbhal c5rng c5sign cbonly cubeaes),) |
57 | | - $(error TARGET must be one of: test | bench | dhuk | stsaes | ccb | ccbhal | c5rng | c5sign | cbonly | cubeaes) |
| 56 | +ifeq ($(filter $(TARGET),test bench dhuk stsaes ccb ccbhal c5rng c5sign cbonly cubeaes cubecrypto),) |
| 57 | + $(error TARGET must be one of: test | bench | dhuk | stsaes | ccb | ccbhal | c5rng | c5sign | cbonly | cubeaes | cubecrypto) |
58 | 58 | endif |
59 | 59 | # c5rng: bare register-level STM32C5 HW-RNG conditioning probe (no wolfCrypt). |
60 | 60 | # c5sign: bare STM32C5 PROTECTED ECDSA-sign probe driving ST's NIST P-256 CAVP |
|
180 | 180 | $(HAL_SRC_DIR)/stm32$(HAL_FAMILY_LC)_hal_rng_ex.c \ |
181 | 181 | $(HAL_SRC_DIR)/stm32$(HAL_FAMILY_LC)_hal_pka.c |
182 | 182 | # CCB targets (U3 only) need the CCB HAL driver module: ccbhal is the raw HAL |
183 | | - # reference; ccb under cubemx routes the wolfSSL port through HAL_CCB. |
184 | | - ifneq ($(filter $(TARGET),ccb ccbhal),) |
| 183 | + # reference; ccb / cubecrypto under cubemx route the wolfSSL port through HAL_CCB. |
| 184 | + ifneq ($(filter $(TARGET),ccb ccbhal cubecrypto),) |
185 | 185 | HAL_C_SRC += $(HAL_SRC_DIR)/stm32$(HAL_FAMILY_LC)_hal_ccb.c |
186 | 186 | endif |
187 | 187 | # Filter out any files that don't exist (different family packs ship |
@@ -411,6 +411,20 @@ ifeq ($(TARGET),cubeaes) |
411 | 411 | endif |
412 | 412 | COMMON_DEFS += -DWOLF_CRYPTO_CB -DSTM32_CUBE_AES_ONLY |
413 | 413 | endif |
| 414 | +# CubeMX full HW-crypto callback test -- HW ECDSA sign+verify (normal key -> PKA), |
| 415 | +# CCB-protected ECDSA (HAL_CCB), and AES-GCM, all through the crypto callback under |
| 416 | +# WOLF_CRYPTO_CB_ONLY_ECC + WOLF_CRYPTO_CB_ONLY_AES. Exercises the CubeMX device's |
| 417 | +# new ECDSA verify + normal-key sign handlers. Needs the HAL PKA + CCB drivers. |
| 418 | +ifeq ($(TARGET),cubecrypto) |
| 419 | + ifneq ($(BUILD),cubemx) |
| 420 | + $(error TARGET=cubecrypto requires BUILD=cubemx) |
| 421 | + endif |
| 422 | + ifeq ($(filter $(BOARD),u3),) |
| 423 | + $(error TARGET=cubecrypto requires BOARD=u3 (NUCLEO-U385RG-Q)) |
| 424 | + endif |
| 425 | + COMMON_DEFS += -DWOLFSSL_STM32_PKA -DWOLFSSL_DHUK -DWOLF_CRYPTO_CB \ |
| 426 | + -DWOLFSSL_STM32_CCB -DSTM32_CUBE_CRYPTO_ONLY |
| 427 | +endif |
414 | 428 |
|
415 | 429 | ALL_C_SRC := $(SRC_C) $(WC_SRC) |
416 | 430 |
|
|
0 commit comments