| 200 | } |
| 201 | |
| 202 | bool CheckDataSignatureEncoding(const valtype &vchSig, uint32_t flags, |
| 203 | ScriptError *serror) { |
| 204 | // Empty signature. Not strictly DER encoded, but allowed to provide a |
| 205 | // compact way to provide an invalid signature for use with CHECK(MULTI)SIG |
| 206 | if (vchSig.size() == 0) { |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | return CheckRawSignatureEncoding( |
| 211 | vchSig | boost::adaptors::sliced(0, vchSig.size()), flags, serror); |
| 212 | } |
| 213 | |
| 214 | static bool CheckSighashEncoding(const valtype &vchSig, uint32_t flags, |
| 215 | ScriptError *serror) { |