Skip to content

Commit

Permalink
check length, not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
JackDoanRivian authored Nov 5, 2024
1 parent c096f5d commit 45a45ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cert/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (t *TBSCertificate) Sign(signer Certificate, curve Curve, key []byte) (Cert

// readyToSign checks all signing requirements that don't require us to cross-reference with a CA
func (t *TBSCertificate) readyToSign() error {
if t.PublicKey == nil {
if len(t.PublicKey) == 0 {
return fmt.Errorf("public key not set")
}

Expand Down

0 comments on commit 45a45ee

Please sign in to comment.