-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
WiFiClientSecure: use context #7680
Conversation
… wrapper to handle the context
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.
Wow, you did a lot of work!
Generally seems fine, but the extra jump for every call just grates me the wrong way...I can't think of any way around it. Performance-wise, it should not be an issue since the SSL guts are very slow and this only adds 5-6 instructions per high-level call. @devyte may have some ideas here.
New changes look good. I need to run some tests on HW locally before approving, as this is straightforward but pretty big impact... |
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.
LGTM
This PR:
How it is done:
WiFiClientSecure
class toWiFiClientSecureCtx
WiFiClientSecure
with a single member as shared ptr to aWiFiClientSecureCtx*
Both
WiFiClientSecure
andWiFiClientSecureCtx
derive fromWiFiClient
, butWiFiClientSecure
's one is not used. Instead, all its virtual functions call its context's ones.Tested with
BearSSL_MaxFragmentLength.ino