forked from lowRISC/opentitan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ot_certs] Parse Authority and Subjecy Key Identifier manually
OpenSSL has an undocumented quirk: if the basic key usage is empty (and possibly in other circumstances?), it silently pretend that the certificate has no authority or subject key identifier. It is not clear whether this is intentional or a side-effect of a bug but the result is the same: a seemingly valid (but stupid) certificate will generate an error when parse with ot_certs. The solution adopted in this commit is to simply parse those extensions manually. We already have to do it for a number of extensions and those are really simple. As a side effect of this commit, the authority and subject key identifier have become optional fields of the certificate. It is expected that we will always populate them of course but there is no harm in handling this case as well. Signed-off-by: Amaury Pouly <[email protected]>
- Loading branch information
Showing
4 changed files
with
60 additions
and
22 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