crypto/signify: close tmp key file in test (#29444)

pull/29451/head
guangwu 8 months ago committed by GitHub
parent 2e0c5e05ba
commit 8bd0334168
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      crypto/signify/signify_fuzz.go

@ -134,6 +134,7 @@ func createKeyPair() (string, string) {
defer os.Remove(tmpKey.Name())
defer os.Remove(tmpKey.Name() + ".pub")
defer os.Remove(tmpKey.Name() + ".sec")
defer tmpKey.Close()
cmd := exec.Command("signify", "-G", "-n", "-p", tmpKey.Name()+".pub", "-s", tmpKey.Name()+".sec")
if output, err := cmd.CombinedOutput(); err != nil {
panic(fmt.Sprintf("could not verify the file: %v, output: \n%s", err, output))

Loading…
Cancel
Save