Skip to content

Commit 1482722

Browse files
PSONALltcarmelveilleux
authored andcommitted
Fix ESP32 factory data regression caused by commit a45d571 (#20161)
* Fix regression caused by commit a45d571 * Fix nRF connect docs as well Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
1 parent fa8d191 commit 1482722

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/guides/nrfconnect_factory_data_configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ override the inherited classes, complete the following steps:
666666
CHIP_ERROR GetFirmwareInformation(MutableByteSpan & out_firmware_info_buffer) override;
667667
CHIP_ERROR GetDeviceAttestationCert(MutableByteSpan & outBuffer) override;
668668
CHIP_ERROR GetProductAttestationIntermediateCert(MutableByteSpan & outBuffer) override;
669-
CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer) override;
669+
CHIP_ERROR SignWithDeviceAttestationKey(const ByteSpan & messageToSign, MutableByteSpan & outSignBuffer) override;
670670

671671
// ===== Members functions that implement the CommissionableDataProvider
672672
CHIP_ERROR GetSetupDiscriminator(uint16_t & setupDiscriminator) override;

src/platform/ESP32/ESP32FactoryDataProvider.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ CHIP_ERROR ESP32FactoryDataProvider::SignWithDeviceAttestationKey(const ByteSpan
136136
Crypto::P256Keypair keypair;
137137

138138
VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT);
139-
VerifyOrReturnError(IsSpanUsable(digestToSign), CHIP_ERROR_INVALID_ARGUMENT);
139+
VerifyOrReturnError(IsSpanUsable(messageToSign), CHIP_ERROR_INVALID_ARGUMENT);
140140
VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL);
141141

142142
uint8_t privKeyBuf[kDACPrivateKeySize];

0 commit comments

Comments
 (0)