]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.26] 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:37 +0000 (13:16 -0800)
commitc5723195a670a09e64769554163ae12b25839819
treea348e475abedd5c28408c53d9e42fb8f9656ea8b
parentf67a1f4c762b0f534f3da6f83d3ba06b6a5223d1
[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
src/net/smtp/smtp_test.go