diff --git a/verifiers/utils/dsse.go b/verifiers/utils/dsse.go index 2e4aa9ea6..91512c55c 100644 --- a/verifiers/utils/dsse.go +++ b/verifiers/utils/dsse.go @@ -163,7 +163,7 @@ const ( func DsseVerifierNew(content []byte, format KeyFormat, keyID string, sigEncoding *SignatureEncoding) (*dsselib.EnvelopeVerifier, error) { if format == KeyFormatPEM { block, rest := pem.Decode(content) - if rest != nil { + if len(rest) != 0 { return nil, fmt.Errorf("%w: additional data found", serrors.ErrorInvalidPEM) } if block == nil {