Skip to content

removed unused functions and file from wolfCLU. And made minor change…#240

Open
aidankeefe2022 wants to merge 1 commit into
wolfSSL:mainfrom
aidankeefe2022:removed-dead-code-paths
Open

removed unused functions and file from wolfCLU. And made minor change…#240
aidankeefe2022 wants to merge 1 commit into
wolfSSL:mainfrom
aidankeefe2022:removed-dead-code-paths

Conversation

@aidankeefe2022
Copy link
Copy Markdown
Member

… to for loop type to not get compiler error when flag --enable-xmss is turn on for wolfSSL. These functions have zero calls in the entire program and some are possibly in final compiled binary depending on if the compiler feels like optimizing them out. There was also a large function surrounded by #if 0 #endif so that was removed as well.

Copy link
Copy Markdown

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #240

Scan targets checked: wolfclu-bugs, wolfclu-src

No new issues found in the changed files. ✅

@aidankeefe2022 aidankeefe2022 force-pushed the removed-dead-code-paths branch from 372927a to 1a68608 Compare June 2, 2026 22:14
… to for loop type to not get compiler error when flag --enable-xmss is turn on for wolfSSL
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes dead/disabled code paths and build references in wolfCLU, and adjusts XMSS OID parsing loops to avoid a compiler error when --enable-xmss is enabled in wolfSSL.

Changes:

  • Removed unused helper APIs from installed headers and their corresponding unused implementations (HTTP request/response builders; misc helpers).
  • Removed unused certgen implementation files and stripped their build system references (Automake + Visual Studio projects).
  • Updated XMSS/XMSSMT OID parsing loops to use an unsigned loop index.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wolfclu/clu_header_main.h Removes declarations for unused helpers (including HTTP builder APIs).
wolfclu/certgen/clu_certgen.h Removes unused certgen function prototypes.
wolfCLU.vcxproj.filters Removes certgen .c files from the Visual Studio filters listing.
wolfCLU.vcxproj Removes certgen .c files from the Visual Studio project compile list.
src/tools/clu_http.c Removes unused HTTP GET/response builder implementations.
src/tools/clu_funcs.c Removes unused append/stop helpers and associated unused state.
src/sign-verify/clu_verify.c Deletes an #if 0 block and updates XMSS OID parsing loop index type.
src/include.am Removes certgen source files from Automake build sources.
src/certgen/clu_certgen_rsa.c Deletes unused RSA self-signed cert generation implementation.
src/certgen/clu_certgen_ed25519.c Deletes unused Ed25519 self-signed cert generation implementation.
Comments suppressed due to low confidence (1)

wolfclu/certgen/clu_certgen.h:26

  • wolfclu/certgen/clu_certgen.h is installed (wolfclu/include.am:6-22), so removing make_self_signed_rsa_certificate / make_self_signed_ed25519_certificate is a public API break for downstream consumers. If this is intentional, please ensure the removal is documented as a breaking change (and consider a deprecation period if external users exist).
enum {
    SHA_HASH,
    SHA_HASH224,
    SHA_HASH256,
    SHA_HASH384,
    SHA_HASH512
};


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread wolfclu/clu_header_main.h
Comment on lines 279 to 286
/* find algorithm EVP cipher from alog enum
*
* @param alg the algorithm specified by the user (aes, 3des, or camellia)
*/
const WOLFSSL_EVP_CIPHER* wolfCLU_CipherTypeFromAlgo(int alg);

/* adds characters to end of string
*
* @param s the char array we'll be appending to
* @param c the char that will be appended to s
*/
void wolfCLU_append(char* s, char c);

/* interrupt function
*
* @param signo gets type cast to void, interrupts the loop.
*/
void wolfCLU_stop(int signo);

/* finds current time during runtime */
double wolfCLU_getTime(void);
Comment thread wolfclu/clu_header_main.h
Comment on lines 631 to 654
/**
* @brief Get a simple HTTP GET request string
* @return pointer to static HTTP GET request string
*/
const char* wolfCLU_GetDefaultHttpGet(void);

/**
* @brief Get the length of the default HTTP GET request (without null terminator)
* @return length of HTTP GET request
*/
int wolfCLU_GetDefaultHttpGetLength(void);

/**
* @brief Get a simple HTTP 200 OK response string with HTML content
* @return pointer to static HTTP response string
*/
const char* wolfCLU_GetDefaultHttpResponse(void);

/**
* @brief Get the length of the default HTTP response (without null terminator)
* @return length of HTTP response
*/
int wolfCLU_GetDefaultHttpResponseLength(void);

@cconlon cconlon assigned aidankeefe2022 and unassigned cconlon Jun 8, 2026
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.

5 participants