Skip to content

Commit fb23e0a

Browse files
Merge pull request #71 from aporcupine/patch-1
Explicitly check for case where SignatureValue is nil
2 parents 3541f5e + ca2b448 commit fb23e0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

validate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ func (ctx *ValidationContext) validateSignature(el *etree.Element, sig *types.Si
268268
if !bytes.Equal(digest, decodedDigestValue) {
269269
return nil, errors.New("Signature could not be verified")
270270
}
271+
if sig.SignatureValue == nil {
272+
return nil, errors.New("Signature could not be verified")
273+
}
271274

272275
// Decode the 'SignatureValue' so we can compare against it
273276
decodedSignature, err := base64.StdEncoding.DecodeString(sig.SignatureValue.Data)

0 commit comments

Comments
 (0)