Skip to content

Rename ex_data free callback parameters to free_cb - #12253

Open
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:fix-ex-data-free-cb-name
Open

SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:fix-ex-data-free-cb-name

Conversation

@SparkiDev

Copy link
Copy Markdown
Contributor

Description

zlib.h declares a free_func typedef, and wolfssl/internal.h and wolfio.h include zlib.h when HAVE_LIBZ is defined. The WOLFSSL_CRYPTO_EX_free* parameter of the *_get_ex_new_index() functions was also named free_func, which shadows that typedef in a --with-libz build. Rename the parameter to free_cb in the declarations, definitions and the English and Japanese Doxygen docs. No functional change.

Testing

./configure --enable-all --with-libz=/path/to/zlib

zlib.h declares a free_func typedef, and wolfssl/internal.h and wolfio.h
include zlib.h when HAVE_LIBZ is defined. The WOLFSSL_CRYPTO_EX_free*
parameter of the *_get_ex_new_index() functions was also named free_func,
which shadows that typedef in a --with-libz build. Rename the parameter to
free_cb in the declarations, definitions and the English and Japanese
Doxygen docs. No functional change.
@SparkiDev SparkiDev self-assigned this Nov 25, 2026
Copilot AI balanced review requested due to automatic review settings November 25, 2026 00:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the callback-parameter rename intended to avoid zlib typedef shadowing.

No open issues 🎉

What changed in this PR

Renames ex_data free-callback parameters from free_func to free_cb to avoid shadowing zlib’s typedef in libz-enabled builds. Function signatures and runtime behavior remain unchanged.

Changes:

  • Updates parameter names and references in public/internal declarations and implementations.
  • Aligns English and Japanese Doxygen documentation with the renamed parameter.
File Description
wolfssl/​ssl.h Renames callback parameters in public declarations.
wolfssl/​internal.h Updates the internal index-helper declaration.
src/​x509.c Updates the X509 wrapper parameter and forwarding call.
src/​ssl.c Renames parameters and uses in callback helpers and index APIs.
src/​ssl_sess.c Updates the session wrapper parameter and forwarding call.
doc/​dox_comments/​header_files/​ssl.h Aligns English documentation and its declaration.
doc/​dox_comments/​header_files-ja/​ssl.h Aligns Japanese documentation and its declaration.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +108 B, text +13,816 B (+4.9%, 296,396 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@SparkiDev

Copy link
Copy Markdown
Contributor Author

Jenkins: retest this please

@SparkiDev SparkiDev assigned wolfSSL-Bot and unassigned SparkiDev Nov 26, 2026
@philljj philljj self-assigned this Nov 26, 2026
@philljj

philljj commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

not reproducing shadowed variable when testing on Fedora linux.

nit: instead of rename, just prefix all with wc_ex_ (to prevent a future shadowing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants