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

Use letsencrypt ISRG_Root_X1 certificate instead of R3 #21352

Merged

Conversation

gladk
Copy link
Contributor

@gladk gladk commented May 5, 2024

According to the blog post [1] new intermediate certificates will be deployed on 6th of June, 2024.

[1] https://letsencrypt.org/2024/04/12/changes-to-issuance-chains

Thus existing R3 will stop to work for newly issued certificates. This PR replaces R3 by ISRG root one, which should work till 2035.

This change adds about 288 bytes to the final build.

Description:

Related issue (if applicable): fixes #

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.6
  • The code change is tested and works with Tasmota core ESP32 V.3.0.0
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger
Copy link
Collaborator

Why do we need 5 certificates. This is a big size increase

@gladk
Copy link
Contributor Author

gladk commented May 5, 2024

r3 can be removed about 6th of September 2024. Ass all certificates, issued by letsencrypt have a max expiration length 3 months.

according to this picture, only r10 and r11 will be used, but it is not clear, whether we really need r>11.

@gladk
Copy link
Contributor Author

gladk commented May 5, 2024

I wonder if we can use 'ISRG Root X1' instead which is RSA 4096

good catch. Let me check.

@gladk
Copy link
Contributor Author

gladk commented May 5, 2024

@s-hadinger thank you for the hint! It really works. I am updating the merge request.

According to the blog post [1] new intermediate certificates
will be deployed. Thus R3 certificate, used now will not allow
to setup a secure connection.

This root certificate is valid till 2035/06
@gladk gladk force-pushed the add_letsencrypt_r10-r14_certificates branch from 815db46 to 783ecc4 Compare May 5, 2024 11:05
@gladk gladk changed the title Add letsencrypt r10... r14 intermediate certificates Use letsencrypt ISRG_Root_X1 certificate instead of R3 May 5, 2024
@s-hadinger
Copy link
Collaborator

Hold on, I had second thoughts and I'm surprised it's working at all since we don't have the full cert chaon

@gladk
Copy link
Contributor Author

gladk commented May 5, 2024

The main problem is here that the devices flashed with R3 will probably stop working soon, because certificate check will fail.

@s-hadinger
Copy link
Collaborator

I understand. My initial thought was to validate againg ISRG Root X1, but I had second thoughts and I understand that a server certificate should only contain the signature from the intermediate CA (R3 or R10-R15), but does not contain the entire signature chain of to the root CA.

Did you actually try replacing CA with ISRG Root X1? Does it work?

@gladk
Copy link
Contributor Author

gladk commented May 5, 2024

Yes! I checked with ISRG Root X1 on esp8266 and it works! I even changed one random byte to make a negative test, and it failed to connect to the server. So, it works!

What I did not check is the tasmota32. But I hope it should work. Also, this changes gives +about 290 bytes in comparison to initial build.

@s-hadinger
Copy link
Collaborator

Awesome, well done. ESP32 uses exactly the same code so I don't expect any difference.

@s-hadinger s-hadinger merged commit dd161dc into arendst:development May 5, 2024
59 checks passed
@gladk gladk deleted the add_letsencrypt_r10-r14_certificates branch May 5, 2024 19:21
hawa-lc4 pushed a commit to hawa-lc4/Tasmota-dev that referenced this pull request May 7, 2024
According to the blog post [1] new intermediate certificates
will be deployed. Thus R3 certificate, used now will not allow
to setup a secure connection.

This root certificate is valid till 2035/06
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.

2 participants