diff options
| author | Jeff Garzik <[email protected]> | 2012-10-20 10:56:04 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-10-20 10:56:04 -0700 |
| commit | dee0ee2ac9d6feb49eac9683c01a0eeed4389449 (patch) | |
| tree | 9eaf50e73a51a3b40da9cb557090a794138e9f35 /src/script.h | |
| parent | Revert "Merge pull request #1931 from laanwj/2012_10_newicons" (diff) | |
| parent | Check for canonical public keys and signatures (diff) | |
| download | discoin-dee0ee2ac9d6feb49eac9683c01a0eeed4389449.tar.xz discoin-dee0ee2ac9d6feb49eac9683c01a0eeed4389449.zip | |
Merge pull request #1742 from sipa/canonical
Check for canonical public keys and signatures
Diffstat (limited to 'src/script.h')
| -rw-r--r-- | src/script.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/script.h b/src/script.h index fdcf80294..51e3b5eb8 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. |