txh = "01000000010276b76b07f4935c70acf54fbf1f438a4c397a9fb7e633873c4dd3bc062b6b40000000008c493046022100d23459d03ed7e9511a47d13292d3430a04627de6235b6e51a40f9cd386f2abe3022100e7d25b080f0bb8d8d5f878bba7d54ad2fda650ea8d158a33ee3cbd11768191fd004104b0e2c879e4daf7b9ab68350228c159766676a14f5815084ba166432aab46198d4cca98fa3e9981d0a90b2effc514b76279476550ba3663fdcaff94c38420e9d5000000000100093d00000000001976a9149a7b0f3b80c6baaeedce0a0842553800f832ba1f88ac00000000"
>>> hexlify(bin_dbl_sha256(unhexlify(txh))[::-1])
'c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73'
>>>fetchtx('c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73') == txh
True
txh is the test vector (for TxID c99c49da4c38af669dea436d3e73780dfdb6c1ecf9958baa52960e8baee30e73);
Isn't that impossible? It's signing the Tx structure which has the scriptSig in it; usually the scriptSig is replaced by the scriptpubkey for signing