Skip to content

Conversation

@JeremiahM37
Copy link
Contributor

@JeremiahM37 JeremiahM37 commented Aug 28, 2025

Added WOLFPROV_MSG_DEBUG_RETCODE with the function name that is failing and the rc dump.

@JeremiahM37 JeremiahM37 force-pushed the wolfprovErrorMsg branch 2 times, most recently from f826e98 to 6f277c0 Compare August 28, 2025 22:06
@JeremiahM37 JeremiahM37 changed the title Extending error printing for silent wolfssl errors (WIP) Draft: Extending error printing for silent wolfssl errors Aug 29, 2025
@JeremiahM37 JeremiahM37 force-pushed the wolfprovErrorMsg branch 2 times, most recently from 3af9923 to 31b717a Compare August 29, 2025 16:54
Copy link
Contributor

@aidangarske aidangarske left a comment

Choose a reason for hiding this comment

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

You should find a place to mention that to see the rc from wolfssl you must add WP_LOG_DEBUG to the WOLFPROV_LOG_LEVEL_FILTER. Perhaps in wp_logging.h like in wolfProv_LogType

@JeremiahM37 JeremiahM37 marked this pull request as ready for review September 3, 2025 19:01
@JeremiahM37 JeremiahM37 changed the title Draft: Extending error printing for silent wolfssl errors Extending error printing for silent wolfssl errors Sep 3, 2025
@padelsbach
Copy link
Contributor

There are now 240 logs of the form WOLFPROV_MSG_DEBUG(WP_LOG_DEBUG, "foo() failed with rc=%d", rc);

Instead, we could add a function in wp_logging.c which unifies this for DRYness and code size. Eg:

void WOLFPROV_MSG_DEBUG_RETCODE(int component, const char* func_name)
{
    WOLFPROV_MSG_DEBUG(WP_LOG_DEBUG, "%s failed with rc=%d", func_name, rc);
}

Copy link
Contributor

@padelsbach padelsbach left a comment

Choose a reason for hiding this comment

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

Nicely done

@aidangarske aidangarske merged commit 6e5b181 into wolfSSL:master Sep 10, 2025
446 checks passed
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.

3 participants