Page MenuHomePhabricator

Add test case for CheckSignatureEncoding for proper DER encoding

Authored by deadalnix on Jul 16 2018, 12:47.



This ensures IsValidSignatureEncoding is properly checked.

The test time is atrocious because IsValidSignatureEncoding assumes the presence of the sighash type which causes a combinotary explosion, and also uncover a SRP violation. I would like to refactor these to detangle the two, but obviously doing so safely require a test so here we are.

Depends on D1570

Test Plan
make check

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

jasonbcox added inline comments.
190 ↗(On Diff #4317)

Is this referring to the // Non canonical length for S. case? If not, I don't understand which case this is referring to. It might be worth making it explicit as it's own list to pass in here (as a local variable).

203 ↗(On Diff #4317)

Same as above.

Make comments a bit clearer

This revision is now accepted and ready to land.Jul 20 2018, 04:49
This revision was automatically updated to reflect the committed changes.