[release-branch.go1.26] net/smtp: prevent test failures due to expired test certificate
The current localhostCert used for testing seems to have its expiry date
mistakenly set to Mar 18 19:27:54 2026 GMT.
To prevent test failures, use fixed time in tests. Also, regenerate the
certificate so we can fix the time to UNIX epoch (the current
certificate is only valid after Mar 18 2025).
Fixes #77532
Change-Id: I3136d29eaa0c8c4361f5627003f08a0059702f0d
Reviewed-on: https://go-review.googlesource.com/c/go/+/744260
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Nicholas Husin <husin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
(cherry picked from commit
215a070a049ce449480ca6948e7fafdeb7b16920)
Reviewed-on: https://go-review.googlesource.com/c/go/+/748061