Skip to content
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

Update cert.h #336

Merged
merged 7 commits into from
Mar 26, 2022
Merged

Update cert.h #336

merged 7 commits into from
Mar 26, 2022

Conversation

eMadman
Copy link
Collaborator

@eMadman eMadman commented Mar 25, 2022

Still throws an error when trying to connect to check for newer firmware

[ 6772][E][ssl_client.cpp:36] _handle_error(): [start_ssl_client():263]: (-9984) X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
[ 6774][E][WiFiClientSecure.cpp:135] connect(): start_ssl_client: -9984

@eMadman eMadman requested a review from doudar March 25, 2022 00:20
@eMadman eMadman linked an issue Mar 25, 2022 that may be closed by this pull request
@doudar
Copy link
Owner

doudar commented Mar 25, 2022

There's something like a "master" certificate you could look for, also make sure it's for the proper GitHub domain as referenced by the firmware url in settings.h

I remember having to try a couple different ones when auto updates were first implemented. Possibly @MarkusSchneider has some insight in what certificate to use?

@eMadman
Copy link
Collaborator Author

eMadman commented Mar 25, 2022

Reverted the changes - after digging, the original is on the correct cert - Github's using

DigiCert SHA2 High Assurance Server CA

Adding all Digicert certificates  seems to get it working.  Added instructions for future changes
@eMadman
Copy link
Collaborator Author

eMadman commented Mar 25, 2022

Adding all the Digicert certificates seems to fix it. Sent it out to two users for testing
firmware.zip

@doudar doudar marked this pull request as ready for review March 25, 2022 03:27
@doudar
Copy link
Owner

doudar commented Mar 25, 2022

Can you please add a note in cert.h where you got the new ssl from for future reference?

Also need an update to the changelog.

Great work!

Copy link
Owner

@doudar doudar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but check the notes above before you merge.

Thanks!

@MarkusSchneider
Copy link
Collaborator

MarkusSchneider commented Mar 25, 2022

@eMadman You finally solved it 👍.
Last time when I created a certificate I got 3 files. I combined all files into one crt file.
I've got a root-ca certificate, intermediate certificate and the new certificate for my application. root-ca certificate and intermediate certificate are necessary to build the chain of trust to a trusted Root CA.

See here for more details: https://www.keyfactor.com/blog/certificate-chain-of-trust/

Good work.

@eMadman
Copy link
Collaborator Author

eMadman commented Mar 25, 2022

Ready to merge - pending feedback from another user before I click it.

@eMadman
Copy link
Collaborator Author

eMadman commented Mar 26, 2022

I'm comfortable with the changes at this point. Tested on a couple more units - successful attempts at reaching github and downloads of the HTML files

@eMadman eMadman merged commit 873efb1 into doudar:develop Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Certificate error when checking for new firmware
3 participants