varsig: handle unknown version with an error

This commit is contained in:
Michael Muré
2025-07-09 13:15:39 +02:00
parent 6308c66ab7
commit eb70826a70

View File

@@ -123,6 +123,8 @@ func (v varsig) decodePayEncAndSig(r BytesReader) (PayloadEncoding, []byte, erro
if err == nil {
return 0, nil, ErrUnexpectedSignaturePresent
}
default:
return 0, nil, ErrUnsupportedVersion
}
return payEnc, signature, nil