diff --git a/examples/platform/efr32/EFR32DeviceAttestationCreds.cpp b/examples/platform/efr32/EFR32DeviceAttestationCreds.cpp index 942505bd82e81c..f68f0b892be1d6 100644 --- a/examples/platform/efr32/EFR32DeviceAttestationCreds.cpp +++ b/examples/platform/efr32/EFR32DeviceAttestationCreds.cpp @@ -23,7 +23,7 @@ #include "efr32_creds.h" #include "psa/crypto.h" -extern uint32_t __attestation_credentials_base; +extern uint8_t __attestation_credentials_base[]; namespace chip { namespace Credentials { @@ -37,7 +37,7 @@ class DeviceAttestationCredsEFR32 : public DeviceAttestationCredentialsProvider public: CHIP_ERROR GetCertificationDeclaration(MutableByteSpan & out_buffer) override { - ByteSpan cd_span(((uint8_t *) &__attestation_credentials_base) + EFR32_CREDENTIALS_CD_OFFSET, EFR32_CREDENTIALS_CD_SIZE); + ByteSpan cd_span(((uint8_t *) __attestation_credentials_base) + EFR32_CREDENTIALS_CD_OFFSET, EFR32_CREDENTIALS_CD_SIZE); return CopySpanToMutableSpan(cd_span, out_buffer); } @@ -50,15 +50,13 @@ class DeviceAttestationCredsEFR32 : public DeviceAttestationCredentialsProvider CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & out_buffer) override { - ByteSpan cert_span(((uint8_t *) &__attestation_credentials_base) + EFR32_CREDENTIALS_DAC_OFFSET, - EFR32_CREDENTIALS_DAC_SIZE); + ByteSpan cert_span(((uint8_t *) __attestation_credentials_base) + EFR32_CREDENTIALS_DAC_OFFSET, EFR32_CREDENTIALS_DAC_SIZE); return CopySpanToMutableSpan(cert_span, out_buffer); } CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & out_pai_buffer) override { - ByteSpan cert_span(((uint8_t *) &__attestation_credentials_base) + EFR32_CREDENTIALS_PAI_OFFSET, - EFR32_CREDENTIALS_PAI_SIZE); + ByteSpan cert_span(((uint8_t *) __attestation_credentials_base) + EFR32_CREDENTIALS_PAI_OFFSET, EFR32_CREDENTIALS_PAI_SIZE); return CopySpanToMutableSpan(cert_span, out_pai_buffer); }