if(!(e.message.match(/Not a DER sequence|Invalid sequence length|Expected a DER integer|R length is zero|S length is zero|R value excessively padded|S value excessively padded|R value is negative|S value is negative|Invalid hashType/))){
@ -243,14 +243,12 @@ describe('Bitcoin-core', function () {
if(i%2!==0)return
if(i%2!==0)return
vardescription=sig_noncanonical[i-1].slice(0,-1)
vardescription=sig_noncanonical[i-1].slice(0,-1)
if(description==='too long')return// we support non secp256k1 signatures
varbuffer=newBuffer(hex,'hex')
varbuffer=newBuffer(hex,'hex')
it('throws on '+description,function(){
it('throws on '+description,function(){
assert.throws(function(){
assert.throws(function(){
bitcoin.ECSignature.parseScriptSignature(buffer)
bitcoin.ECSignature.parseScriptSignature(buffer)
})
},/Expected DER (integer|sequence)|(R|S) value (excessively padded|is negative)|(R|S|DER sequence) length is (zero|too short|too long|invalid)|Invalid hashType/)