Skip to content

Commit

Permalink
verify: add support for rsapkcs15 keys
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed Oct 6, 2021
1 parent 0142711 commit f329bca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/signature/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ func LoadPublicKey(ctx context.Context, keyRef string) (verifier signature.Verif
}

// PEM encoded file.
ed, err := cosign.PemToECDSAKey(raw)
pubKey, err := cryptoutils.UnmarshalPEMToPublicKey(raw)
if err != nil {
return nil, errors.Wrap(err, "pem to ecdsa")
return nil, errors.Wrap(err, "pem to public key")
}
return signature.LoadECDSAVerifier(ed, crypto.SHA256)
return signature.LoadVerifier(pubKey, crypto.SHA256)
}

func loadKey(keyPath string, pf cosign.PassFunc) (*signature.ECDSASignerVerifier, error) {
Expand Down

0 comments on commit f329bca

Please sign in to comment.