Skip to content

Commit

Permalink
Remove requirement that key is ECDSA
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
  • Loading branch information
haydentherapper committed Apr 26, 2022
1 parent e64d3cc commit b9280fb
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cmd/cosign/cli/fulcio/fulcioverifier/ctl/verify.go
Expand Up @@ -17,7 +17,6 @@ package ctl
import (
"context"
"crypto"
"crypto/ecdsa"
"crypto/sha256"
"crypto/x509"
"encoding/json"
Expand Down Expand Up @@ -93,15 +92,11 @@ func VerifySCT(ctx context.Context, certPEM, chainPEM, rawSCT []byte) error {
if err != nil {
return err
}
ctPub, ok := pub.(*ecdsa.PublicKey)
if !ok {
return fmt.Errorf("invalid public key: was %T, require *ecdsa.PublicKey", pub)
}
keyID, err := ctutil.GetCTLogID(ctPub)
keyID, err := ctutil.GetCTLogID(pub)
if err != nil {
return errors.Wrap(err, "error getting CTFE public key hash")
}
pubKeys[keyID] = logIDMetadata{ctPub, t.Status}
pubKeys[keyID] = logIDMetadata{pub, t.Status}
}
} else {
fmt.Fprintf(os.Stderr, "**Warning** Using a non-standard public key for verifying SCT: %s\n", rootEnv)
Expand Down

0 comments on commit b9280fb

Please sign in to comment.