Skip to content

Commit cd395d5

Browse files
committed
error code if dac and pai both are revoked
1 parent 151bcd8 commit cd395d5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/credentials/attestation_verifier/DeviceAttestationVerifier.h

+2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ enum class AttestationVerificationResult : uint16_t
7979

8080
kInternalError = 900,
8181

82+
kPaiAndDacRevoked = 1000,
83+
8284
kNotImplemented = 0xFFFFU,
8385

8486
// TODO: Add more attestation verification errors

src/credentials/attestation_verifier/TestDACRevocationDelegateImpl.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,17 @@ void TestDACRevocationDelegateImpl::CheckForRevokedDACChain(
186186
if (IsCertificateRevoked(info.paiDerBuffer))
187187
{
188188
ChipLogProgress(NotSpecified, "Found revoked PAI in %s", mDeviceAttestationRevocationSetPath);
189-
attestationError = AttestationVerificationResult::kPaiRevoked;
189+
190+
if (attestationError == AttestationVerificationResult::kDacRevoked)
191+
{
192+
attestationError = AttestationVerificationResult::kPaiAndDacRevoked;
193+
}
194+
else
195+
{
196+
attestationError = AttestationVerificationResult::kPaiRevoked;
197+
}
190198
}
191199
}
192-
193200
onCompletion->mCall(onCompletion->mContext, info, attestationError);
194201
}
195202

0 commit comments

Comments
 (0)