-
Notifications
You must be signed in to change notification settings - Fork 917
Update Arduino examples: 32KB TLS Client/Server; Add wolfcrypt breadcrumbs. #7304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6268a77 to
eef0e9d
Compare
eef0e9d to
e40eb3c
Compare
|
Jenkins retest this please. |
dgarske
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gojimmypi This PR was merged and has a lot of debugging added that should be removed.
| keySz = ssl->eccTempKeySz; | ||
| /* get curve type */ | ||
| if (ssl->ecdhCurveOID > 0) { | ||
| WOLFSSL_MSG("calling ecc_cuve"); /* TODO; review */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new logging entries and TODO's probably should not be here.
| else | ||
| #endif | ||
| { | ||
| WOLFSSL_MSG("make key"); /* TODO review */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new logging entries and TODO's probably should not be here.
| #ifndef WOLFSSL_NO_MALLOC | ||
| if (p == NULL) { | ||
| p = (ecc_point*)XMALLOC(sizeof(ecc_point), heap, DYNAMIC_TYPE_ECC); | ||
| WOLFSSL_MSG_EX("XMALLOC ecc_point %d bytes.", sizeof(ecc_point)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again this logging seems like debugging and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dgarske - yes, the debugging breadcrumbs were included as I found them extremely valuable when enabling DEBUG_WOLFSSL to see where things were proceeding, and where code would quietly just halt when out of memory (in my case - the memory constrained embedded devices such as ESP32 or the tiny 32KB Arduino).
I thought they might be helpful to a future developer in a similar situation. The TODO was however, an oversight on my part and was not intended to be included.
Do you wish to have all of the breadcrumbs in this PR removed, or shall I remove the ones you mentioned and perhaps some others at my discretion?
Revert some debug breadcrumbs in #7304
Description
Although labeled as an Arduino update, others may find the new memory allocation and other function messages useful. The included breadcrumbs allowed me to tune wolfSSL
user_settings.hto have TLS client or server examples with as little as 32KB free RAM. (specifically tested on the Arduino Nano 33 IoT)Ready for Arduino publish version
5.6.6-Arduino.2wolfssl. Movewolfssl.hto separate file.WOLFSSL_MSG()to send messages via ArduinoSerial.print().user_settings.hfor wolfSSL.DEBUG_WOLFSSLis enabled, mostly memory allocation related..gitignoreNote the Arduino
user_settings.hhasDEBUG_WOLFSSLdefined (set to enabled), by default, allowing a more interesting TLS examples, particularly on slower devices.See the Arduino-wolfSSL and log.
To have these changes applied to the wolfSSL Arduino library, see wolfSSL/Arduino-wolfSSL#5.
Fixes zd# n/a
Testing
How did you test?
Manually tested on various Arduino board and:
Checklist