]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.25] net/smtp: prevent test failures due to expired test certificate
authorNicholas S. Husin <nsh@golang.org>
Tue, 10 Feb 2026 22:17:19 +0000 (17:17 -0500)
committerDavid Chase <drchase@google.com>
Wed, 25 Feb 2026 21:16:46 +0000 (13:16 -0800)
commit0c56fa28180c1281bb4934bb6779a72a3fb43f52
tree82f5f13d19ec5d90498de5baf32eca04054d79f9
parent592530ed6b10205d0bbe724d7287278e89381dfc
[release-branch.go1.25] 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 #77531

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/+/748280
src/net/smtp/smtp_test.go