Ephenodrom / Dart-Basic-Utils

A dart package for many helper methods fitting common situations
MIT License
364 stars 77 forks source link

Non Expiring self-signed cert #97

Closed alexrocks59 closed 1 year ago

alexrocks59 commented 1 year ago

How do I make the cert non-expiring. I tried pass 999 to days(generateSelfSignedCertificate) but it only created a 2 year one.

Ephenodrom commented 1 year ago

Currently it is not possible to create a non expiring self signed, you can try to copy the code and build the ASN1 structure on your own and try to not set the "notAfter" date. But I am not sure if this is supported by other software that parses and validates the certificate!

On the other hand, you can just pass 10 000 days as a parameter, so the certificate will cover several years!