Skip to content

Commit 653aac2

Browse files
committed
Fix guard context for forward declarations in asn split
Three fixes for guard-context correctness in the ASN.1 code split: 1. Strip WOLFSSL_ASN_ORIG_INCLUDED from forward declaration wrappers. The file-guard was being applied to fwd decls in asn.c, but at the fwd-decl site that macro is not yet defined, so #ifndef ... #else inverted the condition and hid all declarations. 2. Add outer feature guard tracking. Large feature sections (HAVE_OCSP, HAVE_CRL, WOLFSSL_CERT_GEN, etc.) that span many functions in asn.c are now tracked and re-emitted around the corresponding blocks in asn_orig.c, fixing 'unknown type name' errors in minimal builds. 3. Collect multi-line #if continuations in the outer guard map so that full guard conditions (e.g. #if !defined(NO_RSA) && \ continued across lines) are stored and compared as complete strings, preventing duplicate guard emission. Both modes build and pass tests (5 PASS, 0 FAIL each): ./configure --enable-asn=original && make check ./configure && make check
1 parent 78a28d1 commit 653aac2

2 files changed

Lines changed: 426 additions & 75 deletions

File tree

0 commit comments

Comments
 (0)