diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-08-22 22:33:21 +0200 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-09-21 01:24:25 +0200 |
commit | 58bc86e37fda1aec270bccb3df6c20fbd2a6591c (patch) | |
tree | 281ed668edca7eb3d528f37ebff803e4eaac12bd /src/test/script_P2SH_tests.cpp | |
parent | bfc24bd4cee1c1da944dfd1f236b07e9194f493c (diff) |
Check for canonical public keys and signatures
Only enabled inside tests for now.
Diffstat (limited to 'src/test/script_P2SH_tests.cpp')
-rw-r--r-- | src/test/script_P2SH_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index eabfcd0304..9db584c147 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -14,7 +14,7 @@ using namespace std; // Test routines internal to script.cpp: extern uint256 SignatureHash(CScript scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType); extern bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn, - bool fValidatePayToScriptHash, int nHashType); + bool fValidatePayToScriptHash, bool fStrictEncodings, int nHashType); // Helpers: static std::vector<unsigned char> @@ -40,7 +40,7 @@ Verify(const CScript& scriptSig, const CScript& scriptPubKey, bool fStrict) txTo.vin[0].scriptSig = scriptSig; txTo.vout[0].nValue = 1; - return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict, 0); + return VerifyScript(scriptSig, scriptPubKey, txTo, 0, fStrict, true, 0); } @@ -105,7 +105,7 @@ BOOST_AUTO_TEST_CASE(sign) { CScript sigSave = txTo[i].vin[0].scriptSig; txTo[i].vin[0].scriptSig = txTo[j].vin[0].scriptSig; - bool sigOK = VerifySignature(txFrom, txTo[i], 0, true, 0); + bool sigOK = VerifySignature(txFrom, txTo[i], 0, true, true, 0); if (i == j) BOOST_CHECK_MESSAGE(sigOK, strprintf("VerifySignature %d %d", i, j)); else |