Skip to content

Handle bad system date on install #718

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

Closed
tresf opened this issue Oct 1, 2020 · 1 comment
Closed

Handle bad system date on install #718

tresf opened this issue Oct 1, 2020 · 1 comment
Assignees
Labels
Milestone

Comments

@tresf
Copy link
Contributor

tresf commented Oct 1, 2020

A customer installed QZ Tray however could not connect. The browser console logs showed the following error message:

WebSocket connection to 'wss://localhost:8181/' failed: Error in connection establishment: net::ERR_CERT_DATE_INVALID   qz-tray.js:120

Upon reviewing of the logs, it appears something has gone awry with the system date causing QZ Tray to generate a certificate for 2056 instead of something more sane, like 2022.

2020-09-30 22:36:54,970 [INFO] SSL certificate is still valid for 12878 more days: 2056-01-04T05:09Z.

It's my belief that the issue was caused by a system date being incorrect at time of original install, however this bug could be mitigated if QZ Tray were to regenerate a new SSL cert in the event it spots a validity over a certain threshold. Newer SSL rules don't permit SSL certs which last longer than 2 years (#504 via Ballot 193) and will predictably fail for a 36-year cert.

The task is to see if a 36-year offset can still produce usable SSL certs (e.g. upon restart).

My instinct is to say that if the root CA also suffers the 36-year offset (into the future), it won't work where as an offset into the past will. There's a good chance this bug will be closed as won't-fix but I wanted to document the anomaly.

Note, reinstalling QZ Tray fixed the issue for the offending machine.

@tresf tresf added this to the 2.1.4 milestone Oct 1, 2020
@tresf tresf self-assigned this Oct 1, 2020
@tresf
Copy link
Contributor Author

tresf commented Dec 10, 2020

Newer SSL rules don't permit SSL certs which last longer than 2 years (#504 via Ballot 193) and will predictably fail for a 36-year cert.

Unfortunately -- by design -- the root-ca.crt file that we create at runtime isn't renewable and a root cert generated for the future should still break the chain, since SSL's x509 NotBefore field should be honored strictly.

For this reason, the specific use-case of a future cert is invalid as a fixable bug. Happy to reopen if someone disagrees. For now, reinstall QZ Tray and the problem should go away.

@tresf tresf closed this as completed Dec 10, 2020
@tresf tresf added wontfix and removed enhancement labels Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant