Uh oh!
There was an error while loading. Please reload this page.
Use wolfCrypt's Base16_Decode in test.h when it is available - #1169
Use wolfCrypt's Base16_Decode in test.h when it is available#1169ejohnstown wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Resolves a build collision between wolfSSH’s local Base16_Decode (in test.h) and wolfSSL’s public Base16_Decode declaration when coding.h is included first (notably in TPM builds with --enable-all).
Changes:
- Include
wolfssl/wolfcrypt/coding.hto ensureWOLFSSL_BASE16is visible andBase16_Decodeis declared when available. - Compile the local fallback
Base16_Decodeimplementation only whenWOLFSSL_BASE16is not defined.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #1169
Scan targets checked:wolfssh-bugs, wolfssh-src
No new issues found in the changed files. ✅
- test.h's static Base16_Decode collides with wolfSSL's public one when coding.h lands first, breaking --enable-tpm builds. - Include coding.h in test.h, keeping the local copy only when WOLFSSL_BASE16 is absent; --enable-wolfssh alone does not set it. - api.c includes coding.h too, dropping its hand-declared Base64_Encode_NoNl, which would now be a duplicate.
a65720f to
8ad6ca4Compare
The static Base16_Decode in test.h collides with wolfSSL's public declaration when coding.h is included first. TPM builds hit this, as the wolfTPM headers pull in coding.h, so api.c and unit.c will not build with --enable-tpm against an --enable-all wolfSSL.
Include coding.h and compile the local copy only when WOLFSSL_BASE16 is absent. The include also settles the macro for the guard, which test.h would not otherwise see. The fallback is still needed: --enable-wolfssh alone does not set WOLFSSL_BASE16.