Skip to content

Commit

Permalink
chore: added debug statements in verifier
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bressi <[email protected]>
  • Loading branch information
puffitos committed Sep 25, 2024
1 parent d553c78 commit f257ef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webhook/cosignwebhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,8 +380,10 @@ func (csh *CosignServerHandler) verifyContainer(c corev1.Container, pubKey strin
func (*CosignServerHandler) newVerifierForKey(publicKey crypto.PublicKey) (signature.Verifier, error) {
switch pub := publicKey.(type) {
case *ecdsa.PublicKey:
log.Debug("Creating ECDSA verifier for key")
return signature.LoadECDSAVerifier(pub, crypto.SHA256)
case *rsa.PublicKey:
log.Debug("Creating RSA verifier for key")
return signature.LoadRSAPKCS1v15Verifier(pub, crypto.SHA256)
default:
log.Errorf("Unsupported public key type: %t", publicKey)
Expand Down

0 comments on commit f257ef6

Please sign in to comment.