diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index bebb3cb..b6114a1 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: official: true library-manager: update diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 6362f9c..9b5d917 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -36,28 +36,43 @@ jobs: matrix: board: - fqbn: "arduino:samd:mkr1000" + artifact-name-suffix: arduino-samd-mkr1000 platform-name: arduino:samd - fqbn: "arduino:samd:mkrwifi1010" + artifact-name-suffix: arduino-samd-mkrwifi1010 platform-name: arduino:samd - fqbn: "arduino:samd:nano_33_iot" + artifact-name-suffix: arduino-samd-nano_33_iot + platform-name: arduino:samd + - fqbn: arduino:samd:mkrwan1300 + artifact-name-suffix: arduino-samd-mkrwan1300 platform-name: arduino:samd - fqbn: "arduino:samd:mkrgsm1400" + artifact-name-suffix: arduino-samd-mkrgsm1400 platform-name: arduino:samd - fqbn: "arduino:samd:mkrnb1500" + artifact-name-suffix: arduino-samd-mkrnb1500 platform-name: arduino:samd - fqbn: "arduino:mbed_portenta:envie_m7" + artifact-name-suffix: arduino-mbed_portenta-envie_m7 platform-name: arduino:mbed_portenta - fqbn: arduino:mbed_nano:nanorp2040connect + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect platform-name: arduino:mbed_nano - fqbn: arduino:mbed_nicla:nicla_vision + artifact-name-suffix: arduino-mbed_nicla-nicla_vision platform-name: arduino:mbed_nicla - fqbn: arduino:mbed_opta:opta + artifact-name-suffix: arduino-mbed_opta-opta platform-name: arduino:mbed_opta - fqbn: arduino:mbed_giga:giga + artifact-name-suffix: arduino-mbed_giga-giga platform-name: arduino:mbed_giga - fqbn: arduino:renesas_portenta:portenta_c33 + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 platform-name: arduino:renesas_portenta - fqbn: arduino:renesas_uno:unor4wifi + artifact-name-suffix: arduino-renesas_uno-unor4wifi platform-name: arduino:renesas_uno include: @@ -134,8 +149,8 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save memory usage change report as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-report-${{ matrix.board.artifact-name-suffix }} if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 5b6e9a6..b672ab0 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -20,5 +20,5 @@ jobs: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the "Compile Examples" workflow - sketches-reports-source: sketches-reports + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 59ec78c..c65f6d8 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -19,7 +19,7 @@ on: env: CONFIGURATIONS_FOLDER: .github/label-configuration-files - CONFIGURATIONS_ARTIFACT: label-configuration-files + CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file- jobs: check: @@ -70,13 +70,13 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml *.yml if-no-files-found: error - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }} sync: needs: download @@ -107,16 +107,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Download configuration files artifact - uses: actions/download-artifact@v3 + - name: Download configuration file artifacts + uses: actions/download-artifact@v4 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + merge-multiple: true + pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* path: ${{ env.CONFIGURATIONS_FOLDER }} - - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + - name: Remove unneeded artifacts + uses: geekyeggo/delete-artifact@v5 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* - name: Merge label configuration files run: | diff --git a/library.properties b/library.properties index 31d2ed2..4f0437e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_SecureElement -version=0.1.2 +version=0.1.3 author=Arduino maintainer=Arduino sentence=Arduino Library for the Atmel/Microchip ECC508 and ECC608 and NXP SE050 crypto chips diff --git a/src/SecureElementConfig.h b/src/SecureElementConfig.h index bbc7805..12815d0 100644 --- a/src/SecureElementConfig.h +++ b/src/SecureElementConfig.h @@ -11,11 +11,12 @@ #ifndef SECURE_ELEMENT_CONFIG_H_ #define SECURE_ELEMENT_CONFIG_H_ -#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \ - defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ - defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \ - defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \ - defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_OPTA) || \ +#if defined(ARDUINO_AVR_UNO_WIFI_REV2) ||\ + defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ||\ + defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) ||\ + defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) ||\ + defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) ||\ + defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_OPTA) ||\ defined(ARDUINO_GIGA) #define SECURE_ELEMENT_IS_ECCX08 #endif diff --git a/src/utility/SElementArduinoCloudCertificate.cpp b/src/utility/SElementArduinoCloudCertificate.cpp index 0478aa1..e44ccd2 100644 --- a/src/utility/SElementArduinoCloudCertificate.cpp +++ b/src/utility/SElementArduinoCloudCertificate.cpp @@ -39,6 +39,7 @@ int SElementArduinoCloudCertificate::write(SecureElement & se, ECP256Certificate int SElementArduinoCloudCertificate::read(SecureElement & se, ECP256Certificate & cert, const SElementArduinoCloudSlot certSlot, const SElementArduinoCloudSlot keySlot) { #if defined(SECURE_ELEMENT_IS_SE050) || defined(SECURE_ELEMENT_IS_SOFTSE) + (void)keySlot; byte derBuffer[SE_CERT_BUFFER_LENGTH]; size_t derLen; if (!se.readSlot(static_cast(certSlot), derBuffer, sizeof(derBuffer))) {