You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go the certificate for subjectId 30:A7:FC:6C:D6:FA:5A:CB:82:7F:77:6E:32:62:07:6B:B8:11:E4:29 (found here) and save the pemCert field to a file (make sure to replace \n with newlines).
It seems to be that the mbedtls implementation in chip expects the Basic Constraint extension to have a pathLen field to be set, while the matter specification marks this field as optional (see §6.2.2.5 in the v1.1 spec).
The certificate that was used in the reproduction path omits the pathLen field, as can be seen when reading the certificate using the following command:
Problem:
- Since Matter 1.1, PAAs are allowed to omit the pathlen optional
field to basic constraints extension. The code did not do that
- Fixesproject-chip#27194
Changes in this PR:
- Update all CryptoPAL backends to fix the path length checks
- Added unit tests covering valid and invalid basic constraints
around path lengths.
Testing done:
- Unit tests pass on both mbedTLS and BoringSSL/OpenSSL CryptoPAL
* Fix PAA pathlen check
Problem:
- Since Matter 1.1, PAAs are allowed to omit the pathlen optional
field to basic constraints extension. The code did not do that
- Fixes#27194
Changes in this PR:
- Update all CryptoPAL backends to fix the path length checks
- Added unit tests covering valid and invalid basic constraints
around path lengths.
Testing done:
- Unit tests pass on both mbedTLS and BoringSSL/OpenSSL CryptoPAL
* Restyled by clang-format
* Address review comments
* Address review comments
* Improve logic with help from @bzbarsky-apple
* Restyled by clang-format
---------
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
Reproduction steps
Build
chip-tool
withmbedtls
cd example/chip-tool
gn gen out/build --args='chip_crypto="mbedtls"'
ninja -C out/build
30:A7:FC:6C:D6:FA:5A:CB:82:7F:77:6E:32:62:07:6B:B8:11:E4:29
(found here) and save thepemCert
field to a file (make sure to replace\n
with newlines).der
formatchip-tool
pairing with--paa-trust-store-path
set to the folder containing theder
certificate.Bug prevalence
Whenever I do this
GitHub hash of the SDK that was being used
40fb7c2
Platform
core
Platform Version(s)
No response
Anything else?
It seems to be that the mbedtls implementation in chip expects the
Basic Constraint
extension to have apathLen
field to be set, while the matter specification marks this field as optional (see §6.2.2.5 in the v1.1 spec).The certificate that was used in the reproduction path omits the
pathLen
field, as can be seen when reading the certificate using the following command:Certificates that do have the
pathLen
field set (e.g.D8:93:5A:88:DC:52:53:EA:35:4F:CE:D9:03:CE:D2:F6:2A:5C:AA:FF
) can be used with mbedtls and will not show the ASN1 tag error.The text was updated successfully, but these errors were encountered: