Make wolfCrypt ASN cert parsing functionality public.#4645
Merged
dgarske merged 1 commit intowolfSSL:masterfrom Dec 11, 2021
Merged
Make wolfCrypt ASN cert parsing functionality public.#4645dgarske merged 1 commit intowolfSSL:masterfrom
dgarske merged 1 commit intowolfSSL:masterfrom
Conversation
dgarske
requested changes
Dec 10, 2021
Member
dgarske
left a comment
There was a problem hiding this comment.
Also, I double checked and those internal functions DO have argument checking on them. Luckily.
Currently, the `ParseCert` function is only available if `WOLFSSL_ASN_API` is defined to `WOLFSSL_API`. The only way to achieve this without enabling the compatibility layer is to define `WOLFSSL_TEST_CERT`. There are users defining this so that they can parse certs with wolfCrypt, even though this doesn't seem to be the original intent of the define. This commit adds the function `wc_ParseCert` to the public wolfCrypt API. It's simply a wrapper around `ParseCert`. Similarly, this commit adds `wc_InitDecodedCert` and `wc_FreeDecodedCert` to the public API, which are wrappers around `InitDecodedCert` and `FreeDecodedCert`, respectively.
273f58b to
6764e7c
Compare
dgarske
approved these changes
Dec 10, 2021
cconlon
approved these changes
Dec 11, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the
ParseCertfunction is only available ifWOLFSSL_ASN_APIisdefined to
WOLFSSL_API. The only way to achieve this without enabling thecompatibility layer is to define
WOLFSSL_TEST_CERT. There are users definingthis so that they can parse certs with wolfCrypt, even though this doesn't seem
to be the original intent of the define. This commit adds the function
wc_ParseCertto the public wolfCrypt API. It's simply a wrapper aroundParseCert. Similarly, this commit addswc_InitDecodedCertandwc_FreeDecodedCertto the public API, which are wrappers aroundInitDecodedCertandFreeDecodedCert, respectively.