From 3b171c4140f14b43558d2719457ca215140db3d2 Mon Sep 17 00:00:00 2001 From: laurentsimon <64505099+laurentsimon@users.noreply.github.com> Date: Mon, 9 Oct 2023 16:17:48 -0700 Subject: [PATCH] feat: Address unresolved comments from #705 (#708) closes https://github.com/slsa-framework/slsa-verifier/issues/707 Signed-off-by: laurentsimon --- verifiers/utils/dsse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {