- Notifications
You must be signed in to change notification settings - Fork13.3k
Keep client certs when server authentication set#7464
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Merged
Uh oh!
There was an error while loading.Please reload this page.
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
WiFiClientSecure.setInsecure() was clearing the secret key (but not the_chain public client cert) incorrectly. The other server authenticationmodes also had the same effect.The only way for it to work would be if the app first set the serverauthentication method and then the client keys. There's no good reasonfor this.Adjust the connection to only clear the server id methods and leave theclient ID untouched.Fixesesp8266#7455
earlephilhower added a commit to earlephilhower/Arduino that referenced this pull requestJul 23, 2020
PResp8266#7464 removed the reset of client authentication settings when serverauthentication settings were changed, however it never did initializethe client authentication information to nullptr in the constructor.This can result in crashes during connections when client certs are notapplied.Fix by resetting the client authenticaion variables on objectconstruction.
This was referencedJul 23, 2020
earlephilhower added a commit that referenced this pull requestJul 23, 2020
PR#7464 removed the reset of client authentication settings when serverauthentication settings were changed, however it never did initializethe client authentication information to nullptr in the constructor.This can result in crashes during connections when client certs are notapplied.Fix by resetting the client authenticaion variables on objectconstruction.
earlephilhower added a commit to earlephilhower/Arduino that referenced this pull requestAug 3, 2020
Run valgrind on host mock example runs to catch more bugs in CI. Thesetests would have caught the problem inesp8266#7464 before users did.Add a list of some randomly picked examples to run, and add an option torun the loop exactly once in the host mock routine, so the test willactually exit under valgrind.
earlephilhower added a commit that referenced this pull requestAug 4, 2020
Run valgrind on host mock example runs to catch more bugs in CI. Thesetests would have caught the problem in#7464 before users did.Add a list of some randomly picked examples to run, and add an option torun the loop exactly once in the host mock routine, so the test willactually exit under valgrind.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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