make skipping output optional

This commit is contained in:
Özgür Kesim 2022-01-25 18:53:00 +01:00
parent 8f08005212
commit c2608033e5
Signed by: oec
GPG Key ID: 3D76A56D79EDD9D7

View File

@ -679,7 +679,9 @@ func Sign(input *Input, skip map[SHA512Hash]bool, url string, pk ed25519.Private
hash, sig := SignDenom(&denom, sha512.Sum512(append([]byte(url), 0)), &input.Arguments.MasterPublicKey, &pk) hash, sig := SignDenom(&denom, sha512.Sum512(append([]byte(url), 0)), &input.Arguments.MasterPublicKey, &pk)
if skip[hash] { if skip[hash] {
if *verbose {
log.Printf("Skipping denom_pub_h %q as it has been already signed\n", hash) log.Printf("Skipping denom_pub_h %q as it has been already signed\n", hash)
}
continue continue
} }
@ -696,6 +698,7 @@ var (
injson = flag.String("input", "-", "input json for signing") injson = flag.String("input", "-", "input json for signing")
keyfile = flag.String("key", "auditor.key", "filename of EC25519 private key") keyfile = flag.String("key", "auditor.key", "filename of EC25519 private key")
url = flag.String("url", "https://auditor.codeblau.de/", "auditor url") url = flag.String("url", "https://auditor.codeblau.de/", "auditor url")
verbose = flag.Bool("v", false, "verbose output on stderr")
) )
func main() { func main() {