Keep client certs when server authentication set by earlephilhower · Pull Request #7464 · esp8266/Arduino (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation0 Commits2 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
WiFiClientSecure.setInsecure() was clearing the secret key (but not the
_chain public client cert) incorrectly. The other server authentication
modes also had the same effect.
The only way for it to work would be if the app first set the server
authentication method and then the client keys. There's no good reason
for this.
Adjust the connection to only clear the server id methods and leave the
client ID untouched.
Fixes #7455
WiFiClientSecure.setInsecure() was clearing the secret key (but not the _chain public client cert) incorrectly. The other server authentication modes also had the same effect.
The only way for it to work would be if the app first set the server authentication method and then the client keys. There's no good reason for this.
Adjust the connection to only clear the server id methods and leave the client ID untouched.
Fixes esp8266#7455
d-a-v added a commit that referenced this pull request
earlephilhower added a commit to earlephilhower/Arduino that referenced this pull request
PR esp8266#7464 removed the reset of client authentication settings when server authentication settings were changed, however it never did initialize the client authentication information to nullptr in the constructor. This can result in crashes during connections when client certs are not applied.
Fix by resetting the client authenticaion variables on object construction.
This was referenced
Jul 23, 2020
earlephilhower added a commit that referenced this pull request
PR #7464 removed the reset of client authentication settings when server authentication settings were changed, however it never did initialize the client authentication information to nullptr in the constructor. This can result in crashes during connections when client certs are not applied.
Fix by resetting the client authenticaion variables on object construction.
earlephilhower added a commit to earlephilhower/Arduino that referenced this pull request
Run valgrind on host mock example runs to catch more bugs in CI. These tests would have caught the problem in esp8266#7464 before users did.
Add a list of some randomly picked examples to run, and add an option to run the loop exactly once in the host mock routine, so the test will actually exit under valgrind.
earlephilhower added a commit that referenced this pull request
Run valgrind on host mock example runs to catch more bugs in CI. These tests would have caught the problem in #7464 before users did.
Add a list of some randomly picked examples to run, and add an option to run the loop exactly once in the host mock routine, so the test will actually exit under valgrind.
1 participant