Skip to content

Commit

Permalink
cleanup log levels
Browse files Browse the repository at this point in the history
  • Loading branch information
nickysemenza committed Mar 17, 2021
1 parent 8487818 commit 87d9804
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ func (k KeyVaultSigner) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts)

signed, err := k.client.Sign(context.Background(), k.baseURL, k.keyName, k.keyVersion, keyvault.KeySignParameters{Algorithm: algo, Value: &payload})
if err != nil {
return nil, fmt.Errorf("azure: failed to sign against azure: %w", err)
return nil, fmt.Errorf("azure: failed to sign: %w", err)
}

res, err := base64.RawURLEncoding.DecodeString(*signed.Result)
if err != nil {
return nil, fmt.Errorf("failed to base64 recode result: `%s` %w", *signed.Result, err)
}

log.Infof("azure: signed %d bytes with %s for %s key %s", len(digest), algo, k.keyType, k.keyName)
log.Debugf("azure: signed %d bytes with %s for %s key %s", len(digest), algo, k.keyType, k.keyName)

if k.keyType == keyvault.RSA {
return res, nil
Expand Down
2 changes: 1 addition & 1 deletion internal/google/google.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func (k KMSSigner) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (sig
return nil, fmt.Errorf("google: signature crc32 incorrect")
}

log.Infof("google: signed %d bytes with %s for %s key %s", len(digest), opts.HashFunc().String(), k.keyType, k.name)
log.Debugf("google: signed %d bytes with %s for %s key %s", len(digest), opts.HashFunc().String(), k.keyType, k.name)

return result.Signature, nil

Expand Down

0 comments on commit 87d9804

Please # to comment.