aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
diff options
context:
space:
mode:
authorSuhas Daftuar <sdaftuar@gmail.com>2015-02-10 12:11:59 -0500
committerSuhas Daftuar <sdaftuar@gmail.com>2015-02-10 13:25:41 -0500
commit78c6bedb9cd3ed85f829a288146533e3b41f784b (patch)
tree4121912553a9292039683105611d6917cff5c038 /src/test/data
parent6f50dbd2fdeef7bc24317a487936502e25a05de9 (diff)
downloadbitcoin-78c6bedb9cd3ed85f829a288146533e3b41f784b.tar.xz
Add test for DER-encoding edge case
The fix to NegateSignatureS caused a test which had been failing in IsValidSignatureEncoding to then fail in IsLowDERSignature. Add new test so the original check remains exercised.
Diffstat (limited to 'src/test/data')
-rw-r--r--src/test/data/script_invalid.json6
-rw-r--r--src/test/data/script_valid.json6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index 3b2f64d766..3c52547a64 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -696,6 +696,12 @@
"BIP66 example 11, with DERSIG"
],
[
+ "0x48 0x304402203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022054e1c258c2981cdfba5df1f46661fb6541c44f77ca0092f3600331abfffb12510101",
+ "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+ "DERSIG",
+ "P2PK with multi-byte hashtype, with DERSIG"
+],
+[
"0x48 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef001",
"0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
"LOW_S",
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 2b4b0989b9..34e2c8d61a 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -814,6 +814,12 @@
"BIP66 example 12, with DERSIG"
],
[
+ "0x48 0x304402203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022054e1c258c2981cdfba5df1f46661fb6541c44f77ca0092f3600331abfffb12510101",
+ "0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
+ "",
+ "P2PK with multi-byte hashtype, without DERSIG"
+],
+[
"0x48 0x304502203e4516da7253cf068effec6b95c41221c0cf3a8e6ccb8cbf1725b562e9afde2c022100ab1e3da73d67e32045a20e0b999e049978ea8d6ee5480d485fcf2ce0d03b2ef001",
"0x21 0x03363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640 CHECKSIG",
"",