More fixes to the broken atecc608 test

This commit is contained in:
Daniele Lacamera
2026-05-08 07:28:56 +02:00
parent 5f321d7372
commit ae0d09ccff
3 changed files with 23 additions and 2 deletions
+5
View File
@@ -68,6 +68,11 @@ jobs:
sed -i "/^RUN python3 - <<'PY'$/,/^PY$/d" Dockerfile.wolfcrypt
! grep -q "RUN python3 - <<'PY'" Dockerfile.wolfcrypt
# The simulator Dockerfile predates the new configure contract where
# --with-cryptoauthlib must be paired with --enable-microchip=<dev>.
sed -i 's/--with-cryptoauthlib=\/usr \\/--enable-microchip=608 \\\n --with-cryptoauthlib=\/usr \\/' Dockerfile.wolfcrypt
grep -q -- '--enable-microchip=608' Dockerfile.wolfcrypt
- uses: docker/setup-buildx-action@v3
- name: Build wolfCrypt-ATECC608 test image
+14
View File
@@ -157,6 +157,20 @@ static int ateccx08a_cfg_initialized = 0;
.rx_retries = 20,
},
#endif
#if !defined(WOLFSSL_MANUALLY_SELECT_DEVICE_CONFIG) && \
!(defined(WOLFSSL_ATECC608A) && defined(MICROCHIP_MPLAB_HARMONY_3)) && \
!defined(ATCA_HAL_SPI) && !defined(ATCA_HAL_I2C)
{
/* Custom HAL users provide callbacks later through
* wolfCrypt_ATECC_SetConfig(), but gCfg still needs a valid default
* backing object so configure-time warning builds do not see an empty
* config array. */
.iface_type = ATCA_CUSTOM_IFACE,
.devtype = MICROCHIP_DEV_TYPE,
.wake_delay = 1500,
.rx_retries = 20,
},
#endif
};
static ATCAIfaceCfg* gCfg = &config_atmel_device[WOLFSSL_ATCA_DEVICE_NO];
+4 -2
View File
@@ -26131,13 +26131,15 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
!defined(WOLFSSL_MICROCHIP)
word32 idx = 0;
#endif
int derSz = 0;
#if !defined(WOLFSSL_SP_MATH) && !defined(HAVE_FIPS) && \
(defined(RSA_MIN_SIZE) && (RSA_MIN_SIZE <= 1024))
int keySz = 1024;
#else
int keySz = 2048;
#endif
#if !defined(WC_TEST_SKIP_RSA_PRIVATE_EXPORT) && !defined(WOLFSSL_MICROCHIP)
int derSz = 0;
#endif
#ifdef WOLF_CRYPTO_CB_ONLY_RSA
if (devId == INVALID_DEVID) {
@@ -26180,6 +26182,7 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
if (ret != 0)
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit_rsa);
#endif
#if !defined(WC_TEST_SKIP_RSA_PRIVATE_EXPORT) && !defined(WOLFSSL_MICROCHIP)
#ifndef WOLFSSL_NO_MALLOC
der = (byte*)XMALLOC(FOURK_BUF, HEAP_HINT, DYNAMIC_TYPE_TMP_BUFFER);
if (der == NULL) {
@@ -26189,7 +26192,6 @@ static wc_test_ret_t rsa_keygen_test(WC_RNG* rng)
#else
derSz = sizeof(der);
#endif
#if !defined(WC_TEST_SKIP_RSA_PRIVATE_EXPORT) && !defined(WOLFSSL_MICROCHIP)
derSz = wc_RsaKeyToDer(genKey, der, derSz);
if (derSz < 0) {
ERROR_OUT(WC_TEST_RET_ENC_EC(derSz), exit_rsa);