Skip to content

Commit

Permalink
AttestationVerifier: Do not return error when ExtractSKIDFromX509Cert…
Browse files Browse the repository at this point in the history
… fails (#22301)
  • Loading branch information
wqx6 authored and pull[bot] committed Nov 2, 2022
1 parent c222ff5 commit aa73335
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,10 @@ CHIP_ERROR FileAttestationTrustStore::GetProductAttestationAuthorityCert(const B
{
uint8_t skidBuf[Crypto::kSubjectKeyIdentifierLength] = { 0 };
MutableByteSpan candidateSkidSpan{ skidBuf };
VerifyOrReturnError(CHIP_NO_ERROR ==
Crypto::ExtractSKIDFromX509Cert(ByteSpan{ candidate.data(), candidate.size() }, candidateSkidSpan),
CHIP_ERROR_INTERNAL);
if (CHIP_NO_ERROR != Crypto::ExtractSKIDFromX509Cert(ByteSpan{ candidate.data(), candidate.size() }, candidateSkidSpan))
{
continue;
}

if (skid.data_equal(candidateSkidSpan))
{
Expand Down

0 comments on commit aa73335

Please sign in to comment.