Add public alt-name list APIs#10768
Open
Frauschi wants to merge 1 commit into
Open
Conversation
|
retest this please |
|
Expose the internal SAN-list helpers as public wc_ APIs so callers can build a DNS_entry list, encode it into a DER GeneralNames SEQUENCE, and populate a Cert directly: - wc_SetDNSEntry() - append a typed alt-name entry to a list - wc_FlattenAltNames() - encode a list into a buffer (thin wrapper) - wc_SetAltNamesFromList() - encode a list straight into cert->altNames/Sz Declarations live in asn.h (they use the DNS_entry type) and are gated by the existing WOLFSSL_ASN_API export macro; doxygen notes the WOLFSSL_PUBLIC_ASN/ OPENSSL_EXTRA export requirement. Adds a wolfCrypt test covering the success, NULL-list, NULL-output, BUFFER_E, and Cert paths.
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.
Promotes wolfSSL's internal SAN-list helpers to a public
wc_API so apps can build SAN entries, encode them, and attach them to aCertbefore signing without using internal functions.New functions
wc_SetDNSEntry()DNS_entrylist.wc_FlattenAltNames()GeneralNamesSEQUENCE (general buffer primitive).wc_SetAltNamesFromList()cert->altNames/altNamesSz- mirrorswc_SetAltNamesBuffer.Notes
asn.h(they use theDNS_entrytype) and share theWOLFSSL_ASN_APIexport gate (WOLFSSL_PUBLIC_ASN/OPENSSL_EXTRA/…); doxygen documents this.WOLFSSL_CERT_GEN && WOLFSSL_ALT_NAMES.Testing
Adds
flattenAltNames_testcovering success, NULL-list, NULL-output,BUFFER_E, and theCertpaths. Builds clean and passes under--enable-all.Used in wolfCert.