-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated DAC Validation Procedure to Match the Spec. #21531
Updated DAC Validation Procedure to Match the Spec. #21531
Conversation
PR #21531: Size comparison from cbd90ca to dc6cd50 Increases (1 build for linux)
Decreases (2 builds for linux, telink)
Full report (13 builds for bl602, linux, mbed, nrfconnect, p6, telink)
|
dc6cd50
to
305ef9c
Compare
PR #21531: Size comparison from cbd90ca to 305ef9c Increases (8 builds for bl602, cc13x2_26x2, esp32, linux)
Decreases (6 builds for cc13x2_26x2, esp32, linux, nrfconnect, telink)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this looks functionally good to me, but it would be nice if we could close on this:
https://github.com/project-chip/connectedhomeip/pull/21531/files#r936068987
The operative question is whether a DAC requires NotAfter to be set to X509NoWellDefinedExpirationDate in order to achieve non-expiration for the chain. The spec is very explicit that PAA and PAI don't require this, but I can't find any language that would remove the requirement for a DAC.
- Updated mbedTLS implementation of the ValidateCertificateChain() to ignore validity checks of the certificates in the validation chain. - Updated OpenSSL implementation of the ValidateCertificateChain() to use notBefore time of the DAC certificate as a current time. That way the chain validation function checks exactly that the PAA and PAI were valid at the time of DAC generation. - NOTE: Ideally it would be nice if mbedTLS and OpenSSL implementations of ValidateCertificateChain() function behaive similar. Unfortunately, I didn't find a way to adjust the mbedTLS current time during the chain validation. - Created new test vectors for PAA, PAI, and DAC (correct and with errors) to validate all various corner cases of the implementation.
305ef9c
to
d0a8a60
Compare
PR #21531: Size comparison from 3deee28 to d0a8a60 Increases above 0.2%:
Increases (6 builds for esp32, linux)
Decreases (5 builds for cyw30739, esp32, linux, telink)
Full report (43 builds for bl602, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, telink)
|
- Removed use of IsCertificateValidAtCurrentTime() as spec doesn't require DAC certificate validity check at the current time. - Updated mbedTLS implementation of the ValidateCertificateChain() to ignore validity checks of the certificates in the validation chain. - Updated OpenSSL implementation of the ValidateCertificateChain() to use notBefore time of the DAC certificate as a current time. That way the chain validation function checks exactly that the PAA and PAI were valid at the time of DAC generation. - NOTE: Ideally it would be nice if mbedTLS and OpenSSL implementations of ValidateCertificateChain() function behaive similar. Unfortunately, I didn't find a way to adjust the mbedTLS current time during the chain validation. - Created new test vectors for PAA, PAI, and DAC (correct and with errors) to validate all various corner cases of the implementation.
Problem
The attestation certificate chain validation doesn't match the spec requirements.
ticket #21007
Change overview
DAC certificate validity check at the current time.
validity checks of the certificates in the validation chain.
notBefore time of the DAC certificate as a current time. That way the chain
validation function checks exactly that the PAA and PAI were valid at the
time of DAC generation.
ValidateCertificateChain() function behaive similar. Unfortunately, I didn't
find a way to adjust the mbedTLS current time during the chain validation.
to validate all various corner cases of the implementation.
Testing
Generated new test vectors and added new tests