Skip to content

Add wolfSSL debug messages#7223

Merged
SparkiDev merged 1 commit intowolfSSL:masterfrom
gojimmypi:PR-debug-messages
Feb 11, 2024
Merged

Add wolfSSL debug messages#7223
SparkiDev merged 1 commit intowolfSSL:masterfrom
gojimmypi:PR-debug-messages

Conversation

@gojimmypi
Copy link
Copy Markdown
Contributor

Description

The PR adds debug messages in various functions, mostly surrounding more informative failures.

I found these useful while troubleshooting memory-constrained devices. It's particularly helpful to see the sizes of heap allocation attempts.

Of particular interest is wolfSSL_new XMALLOC and the subsequent check of InitSSL() for positive return values. I didn't actually see any. They probably don't even occur. Still...

There's otherwise some tidying up and other minor changes.

Fixes zd# n/a

Testing

How did you test?

Tested in Espressif environment and

./configure --enable-all
make clean
make && make test

I did see a failure for this:

FAIL: testsuite/testsuite.test

But the exact same failure also occurs with a fresh clone of wolfssl.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@gojimmypi gojimmypi self-assigned this Feb 8, 2024
@gojimmypi gojimmypi requested a review from dgarske February 8, 2024 00:38
@gojimmypi gojimmypi force-pushed the PR-debug-messages branch 3 times, most recently from 12a68ec to 8522119 Compare February 8, 2024 01:19
@dgarske dgarske requested review from SparkiDev and removed request for dgarske February 8, 2024 17:57
@dgarske dgarske assigned wolfSSL-Bot and unassigned dgarske Feb 8, 2024
Comment thread src/ssl.c Outdated
Comment thread src/ssl.c Outdated
Comment thread src/ssl.c Outdated
Comment thread src/ssl.c Outdated
Comment thread src/ssl.c Outdated
Comment thread wolfcrypt/src/rsa.c Outdated
Comment thread wolfcrypt/src/rsa.c Outdated
Comment thread wolfcrypt/src/rsa.c Outdated
Comment thread wolfcrypt/src/rsa.c Outdated
Comment thread wolfcrypt/src/rsa.c Outdated
@SparkiDev
Copy link
Copy Markdown
Contributor

Don't want the debug to become too noisy.
That is, only put out debug statements on error or long operations or when required to debug why an error is happening.

@gojimmypi gojimmypi marked this pull request as draft February 8, 2024 23:43
@gojimmypi gojimmypi force-pushed the PR-debug-messages branch 2 times, most recently from 3a1df26 to 4dcdcd0 Compare February 9, 2024 00:47
@gojimmypi
Copy link
Copy Markdown
Contributor Author

Don't want the debug to become too noisy.

Agreed. I removed some of the messages that were only breadcrumbs without any real value.

I hadn't intended this to be such a big code review, but I appreciate your time. I hope this update addresses all of your suggestions. All were completely valid. Thank you.

@gojimmypi gojimmypi marked this pull request as ready for review February 9, 2024 02:22
@gojimmypi gojimmypi requested a review from SparkiDev February 9, 2024 02:22
@SparkiDev SparkiDev merged commit 9f0aa38 into wolfSSL:master Feb 11, 2024
@SparkiDev
Copy link
Copy Markdown
Contributor

Thanks for all the changes!

@gojimmypi gojimmypi deleted the PR-debug-messages branch October 9, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants