-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Minor cleanup of SSL server methods, missing macros #4280
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
#4274 collision :) I'll update mine |
memcpy_P(stackData, cert, certLen); | ||
_ssl->loadServerX509Cert(stackData, certLen); | ||
} | ||
if (rsakey && rsakeyLen) _ssl->loadObject_P(SSL_OBJ_RSA_KEY, rsakey, rsakeyLen); |
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.
Please no 1-line if statements. Just put the _ssl line indented under the if.
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.
My bad! I try and cuddle all if{}s but sometimes one just slips by on me. I've seen too many spots where folks have a 1-line, uncuddle'd if and decide "I'll put in a debug statement here" and end up changing the logic.
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.
No need to apologize! Cross code reviews are meant to catch forests after working on the trees, or something like that :P
My one comment is just about readability |
The server needs to load an X509 and RSK key, but instead of using the existing loadObject() calls implemented its own. Remove them and use the standard ones instead. The DEBUG_OUTPUT macro was undefined in the SSL Web server. Add it in do that when you compile with DEBUG=HTTP_SERVER it actually compiles.
0f4710e
to
c1a8188
Compare
The first of these commits removes duplicated code for loading certs. There's already a method to do this, so the add'l ones added for support of ESP8266WiFiServerSecure were not needed.
The second one fixes a compile error found in the WebServerSecure class when HTTP_SERVER debugging is enabled. The output macro wasn't brought in from the original, non-secure file.