1
0
mirror of https://github.com/golang/go synced 2024-09-23 21:20:13 -06:00

crypto/x509: replace os.MkdirTemp with T.TempDir

Updates #45402

Change-Id: Ifb1fa5232a0fa1be62e886643cec9deaa3b312ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/308409
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
This commit is contained in:
ian woolf 2021-04-08 20:42:47 +08:00 committed by Ian Lance Taylor
parent d25c4fbe05
commit 8518aac314

View File

@ -147,11 +147,7 @@ func TestLoadSystemCertsLoadColonSeparatedDirs(t *testing.T) {
os.Setenv(certFileEnv, origFile)
}()
tmpDir, err := os.MkdirTemp(os.TempDir(), "x509-issue35325")
if err != nil {
t.Fatalf("Failed to create temporary directory: %v", err)
}
defer os.RemoveAll(tmpDir)
tmpDir := t.TempDir()
rootPEMs := []string{
geoTrustRoot,