-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused OpenSSL-only PKCS7 operations (#18089)
- There are no callsites for `LoadCertsFromPKCS7` and associated PKCS7 primitives - These deal with DER certificates, in contexts where common Matter code would never make use of them. At best it would be used inside NOC issuing logic if, internally, a commissioner received chains in PKCS7 format - The code is only available on OpenSSL backend, and this is the only feature not available on mbedTLS as well. - The code makes use of unsafe casts and omits error checking, e.g. ``` bytes_written = static_cast<size_t>(i2d_X509(sk_X509_value(certs, static_cast<int>(i)), pX509ListAux)); ``` which ignores errors from i2d_X509 that could return -1, which could cause invalid offsets or other semantic errors. Overall, given that the code has risks in its usage, and is not available on mbedTLS backend, and is never used by common code, it's just easier to remove it from the SDK and let the organizations who need it make use of it. If the code is reinstated, the unsafe use of `static_cast` and the ignoring of error values would need to be fixed in the PKCS7 code. Testing done: - Unit tests still pass after removal
- Loading branch information
1 parent
693454e
commit 2304656
Showing
5 changed files
with
0 additions
and
343 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.