aboutsummaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorGregory Maxwell <greg@xiph.org>2013-08-15 18:42:28 -0700
committerGregory Maxwell <greg@xiph.org>2013-08-15 18:42:28 -0700
commit47491a90b6544fbb99dc00b3deb554da66c3a54a (patch)
tree337a390536a472307825c284525814143b6a89a2 /src/script.h
parent13d3b1c144756dfe31792209d09f5205f55f95bb (diff)
parenta81cd96805ce6b65cca3a40ebbd3b2eb428abb7b (diff)
downloadbitcoin-47491a90b6544fbb99dc00b3deb554da66c3a54a.tar.xz
Merge pull request #2131 from sipa/evens
Only create signatures with even S, and verification mode to check.
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/script.h b/src/script.h
index 03afe8b652..fd5b12921e 100644
--- a/src/script.h
+++ b/src/script.h
@@ -32,9 +32,10 @@ enum
enum
{
SCRIPT_VERIFY_NONE = 0,
- SCRIPT_VERIFY_P2SH = (1U << 0),
- SCRIPT_VERIFY_STRICTENC = (1U << 1),
- SCRIPT_VERIFY_NOCACHE = (1U << 2),
+ SCRIPT_VERIFY_P2SH = (1U << 0), // evaluate P2SH (BIP16) subscripts
+ SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys
+ SCRIPT_VERIFY_EVEN_S = (1U << 2), // enforce even S values in signatures (depends on STRICTENC)
+ SCRIPT_VERIFY_NOCACHE = (1U << 3), // do not store results in signature cache (but do query it)
};
enum txnouttype
@@ -665,8 +666,8 @@ public:
}
};
-bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey);
-bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig);
+bool IsCanonicalPubKey(const std::vector<unsigned char> &vchPubKey, unsigned int flags);
+bool IsCanonicalSignature(const std::vector<unsigned char> &vchSig, unsigned int flags);
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, const CTransaction& txTo, unsigned int nIn, unsigned int flags, int nHashType);
bool Solver(const CScript& scriptPubKey, txnouttype& typeRet, std::vector<std::vector<unsigned char> >& vSolutionsRet);