@@ -196,7 +196,7 @@ CHIP_ERROR ExampleSe05xDACProviderv2::SignWithDeviceAttestationKey(const ByteSpa
196
196
};
197
197
198
198
tempBuf[0 ] = (uint8_t ) TLV::TLVElementType::Structure;
199
- SuccessOrExit (err = se05xSetCertificate (START_CONTAINER_SE05X_ID, tempBuf, 1 ));
199
+ SuccessOrExit (se05xSetCertificate (START_CONTAINER_SE05X_ID, tempBuf, 1 ));
200
200
201
201
for (int i = 1 ; i <= NO_OF_DEV_ATTEST_MSG_TAGS_TO_PARSE; i++)
202
202
{
@@ -206,7 +206,6 @@ CHIP_ERROR ExampleSe05xDACProviderv2::SignWithDeviceAttestationKey(const ByteSpa
206
206
{
207
207
continue ;
208
208
}
209
- // TODO: Should this be setting err = tlverr?
210
209
SuccessOrExit (tlverr);
211
210
212
211
// Transient binary object ids starting from location 0x7D300005 (TAG1_ID) to 0x7D30000D (TAG3_VALUE_ID)
@@ -216,35 +215,35 @@ CHIP_ERROR ExampleSe05xDACProviderv2::SignWithDeviceAttestationKey(const ByteSpa
216
215
taglen = tagReader.GetLength ();
217
216
tempBuf[0 ] = tagReader.GetControlByte ();
218
217
tempBuf[1 ] = i;
219
- SuccessOrExit (err = se05xSetCertificate (TAG1_ID + (3 /* tag + length + value ids */ * (i - 1 )), tempBuf, 2 ));
218
+ SuccessOrExit (se05xSetCertificate (TAG1_ID + (3 /* tag + length + value ids */ * (i - 1 )), tempBuf, 2 ));
220
219
if (taglen > 256 )
221
220
{
222
221
tempBuf[0 ] = taglen & 0xFF ;
223
222
tempBuf[1 ] = (taglen >> 8 ) & 0xFF ;
224
- SuccessOrExit (err = se05xSetCertificate (TAG1_LEN_ID + (3 * (i - 1 )), tempBuf, 2 ));
223
+ SuccessOrExit (se05xSetCertificate (TAG1_LEN_ID + (3 * (i - 1 )), tempBuf, 2 ));
225
224
}
226
225
else
227
226
{
228
227
tempBuf[0 ] = taglen;
229
- SuccessOrExit (err = se05xSetCertificate (TAG1_LEN_ID + (3 * (i - 1 )), tempBuf, 1 ));
228
+ SuccessOrExit (se05xSetCertificate (TAG1_LEN_ID + (3 * (i - 1 )), tempBuf, 1 ));
230
229
}
231
230
if (taglen > 0 )
232
231
{
233
- SuccessOrExit (err = tagReader.Get (tagvalue));
234
- SuccessOrExit (err = se05xSetCertificate (TAG1_VALUE_ID + (3 * (i - 1 )), tagvalue.data (), taglen));
232
+ SuccessOrExit (tagReader.Get (tagvalue));
233
+ SuccessOrExit (se05xSetCertificate (TAG1_VALUE_ID + (3 * (i - 1 )), tagvalue.data (), taglen));
235
234
}
236
235
}
237
236
238
237
tempBuf[0 ] = (uint8_t ) TLV::TLVElementType::EndOfContainer;
239
- SuccessOrExit (err = se05xSetCertificate (END_CONTAINER_SE05X_ID, tempBuf, 1 ));
238
+ SuccessOrExit (se05xSetCertificate (END_CONTAINER_SE05X_ID, tempBuf, 1 ));
240
239
241
240
if ((tagReader.GetRemainingLength () + 1 /* End container */ ) >= 16 )
242
241
{
243
242
/* Set attestation challenge */
244
- SuccessOrExit (err = se05xSetCertificate (ATTEST_CHALLENGE_ID, (message_to_sign.end () - 16 ), 16 ));
243
+ SuccessOrExit (se05xSetCertificate (ATTEST_CHALLENGE_ID, (message_to_sign.end () - 16 ), 16 ));
245
244
}
246
245
247
- SuccessOrExit (err = se05xPerformInternalSign (DEV_ATTESTATION_KEY_SE05X_ID_IS, signature_se05x, &signature_se05x_len));
246
+ SuccessOrExit (se05xPerformInternalSign (DEV_ATTESTATION_KEY_SE05X_ID_IS, signature_se05x, &signature_se05x_len));
248
247
249
248
err = chip::Crypto::EcdsaAsn1SignatureToRaw (chip::Crypto::kP256_FE_Length , ByteSpan{ signature_se05x, signature_se05x_len },
250
249
out_signature_buffer);
0 commit comments