removed unused functions and file from wolfCLU. And made minor change…#240
Open
aidankeefe2022 wants to merge 1 commit into
Open
removed unused functions and file from wolfCLU. And made minor change…#240aidankeefe2022 wants to merge 1 commit into
aidankeefe2022 wants to merge 1 commit into
Conversation
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #240
Scan targets checked: wolfclu-bugs, wolfclu-src
No new issues found in the changed files. ✅
372927a to
1a68608
Compare
… to for loop type to not get compiler error when flag --enable-xmss is turn on for wolfSSL
1a68608 to
7531898
Compare
Contributor
There was a problem hiding this comment.
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 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 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); | ||
|
|
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.
… 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.