zmap / zcrypto

Liberal Go TLS + X.509 Library for Research
Other
135 stars 83 forks source link

fix cert validity #314

Closed aspacewalz closed 3 years ago

aspacewalz commented 3 years ago

This PR updates the clampTime minimum to be the start of timestamp instead of the epoch.

It also updates the validity length computation to use integer math on the seconds instead of time math. This is because time.Duration() has a limit of around 290 years while the new possible range is nearly 10k years.