crypto: throw on SignFinal failure

fix #6963
Merge remote-tracking branch 'upstream/v0.10' into v0.10