Repository navigation
Conversation
DERSignature.stream_serialize does not write the remaining length of the message after the header byte. This patch resolves the issue by writing the length of what remains to be written immediately after the header byte.
|
Why not use self.length ? it is already calculated and set in stream_deserialize() |
|
Did you try this fix and test? |
|
@dbolser, If your question is directed to me: I did not, because signature.py is removed in https://github.com/Simplexum/python-bitcointx - libsecp256k1 functions are used for parsing/encoding signatures. |
|
OK, seems like this should be closed (@petertodd). |
|
@dbolser Alright, closing. |
|
This change seem to actually fix the bug in DERSignature.stream_serialize(), it is just that this method is not used in python-bitcoinlib code at all (only deserialize is used). @petertodd I think this PR should be left open, as there might be the people who will try to use this code to serialize a signature, and will hit the bug. At least they can find solution here. And if someone picks up the mainteinance of the library as-is, they will know what patches to apply. |
Related: petertodd#295. Prior art: petertodd#190 identified the missing sequence length. AI-assisted patch preparation and testing.
DERSignature.stream_serializedoes not write the remaining length of the message after the header byte.This patch resolves the issue by writing the length of what remains to be written immediately after the header byte.