crypto/signify: fix fuzz test compilation (#33402)
Some checks failed
/ Linux Build (push) Has been cancelled
/ Linux Build (arm) (push) Has been cancelled
/ Keeper Build (push) Has been cancelled
/ Windows Build (push) Has been cancelled
/ Docker Image (push) Has been cancelled

The fuzz test file has been broken for a while - it doesn't compile with
the `gofuzz` build tag.

Two issues:
- Line 59: called `SignifySignFile` which doesn't exist (should be
`SignFile`)
- Line 71: used `:=` instead of `=` for already declared `err` variable
This commit is contained in:
David Klank 2025-12-13 06:09:07 +02:00 committed by GitHub
parent 3a5560fa98
commit a9eaf2ffd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -56,7 +56,7 @@ func Fuzz(data []byte) int {
fmt.Printf("untrusted: %v\n", untrustedComment)
fmt.Printf("trusted: %v\n", trustedComment)
err = SignifySignFile(tmpFile.Name(), tmpFile.Name()+".sig", testSecKey, untrustedComment, trustedComment)
err = SignFile(tmpFile.Name(), tmpFile.Name()+".sig", testSecKey, untrustedComment, trustedComment)
if err != nil {
panic(err)
}
@ -68,7 +68,7 @@ func Fuzz(data []byte) int {
signify = path
}
_, err := exec.LookPath(signify)
_, err = exec.LookPath(signify)
if err != nil {
panic(err)
}