aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-08-22 22:33:21 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-09-21 01:24:25 +0200
commit58bc86e37fda1aec270bccb3df6c20fbd2a6591c (patch)
tree281ed668edca7eb3d528f37ebff803e4eaac12bd /src/script.h
parentbfc24bd4cee1c1da944dfd1f236b07e9194f493c (diff)
Check for canonical public keys and signatures
Only enabled inside tests for now.
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/script.h b/src/script.h
index fdcf802945..51e3b5eb84 100644
--- a/src/script.h
+++ b/src/script.h
@@ -581,9 +581,10 @@ public:
+bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey);
+bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig);
-
-bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, int nHashType);
+bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, bool fStrictEncodings, int nHashType);
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);
int ScriptSigArgsExpected(txnouttype t, const std::vector<std::vector<unsigned char> >& vSolutions);
bool IsStandard(const CScript& scriptPubKey);
@@ -594,8 +595,8 @@ bool ExtractDestinations(const CScript& scriptPubKey, txnouttype& typeRet, std::
bool SignSignature(const CKeyStore& keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
bool SignSignature(const CKeyStore& keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType=SIGHASH_ALL);
bool VerifyScript(const CScript& scriptSig, const CScript& scriptPubKey, const CTransaction& txTo, unsigned int nIn,
- bool fValidatePayToScriptHash, int nHashType);
-bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, bool fValidatePayToScriptHash, int nHashType);
+ bool fValidatePayToScriptHash, bool fStrictEncodings, int nHashType);
+bool VerifySignature(const CTransaction& txFrom, const CTransaction& txTo, unsigned int nIn, bool fValidatePayToScriptHash, bool fStrictEncodings, int nHashType);
// Given two sets of signatures for scriptPubKey, possibly with OP_0 placeholders,
// combine them intelligently and return the result.