DevelopingSpace / starchart

A self-serve tool for managing custom domains and certificates
MIT License
20 stars 13 forks source link

Certificate expiry doesn't match validity of certificate #655

Closed humphd closed 1 year ago

humphd commented 1 year ago

After landing the orderUrl fix on production and clearing out the old certificates in the db, I was able to make a certificate. The new certificate says it's only valid for 7 days:

Screenshot 2023-04-19 at 8 43 36 PM

However, if I decode the certificate, it shows:

So something is not right with our certificate date logic.

humphd commented 1 year ago

The problem here is that we're using the expiry of the order, not the certificate, see https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.3.

We need to parse the validity data out of the cert itself. I'll make a PR.