Skip to content

Commit

Permalink
fix(sign): kms unspported message (#1475)
Browse files Browse the repository at this point in the history
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
  • Loading branch information
Dentrax committed Feb 17, 2022
1 parent 1615afb commit ac75e3d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/signature/keys.go
Expand Up @@ -145,12 +145,13 @@ func SignerVerifierFromKeyRef(ctx context.Context, keyRef string, pf cosign.Pass
}

return cosign.LoadPrivateKey([]byte(pk), []byte(pass))
case strings.Contains(keyRef, "://"):
return nil, fmt.Errorf("unsupported provider given")
}

sv, err := kms.Get(ctx, keyRef, crypto.SHA256)
if err == nil {
if strings.Contains(keyRef, "://") {
sv, err := kms.Get(ctx, keyRef, crypto.SHA256)
if err != nil {
return nil, fmt.Errorf("kms get: %w", err)
}
return sv, nil
}

Expand Down

0 comments on commit ac75e3d

Please sign in to comment.