Fix error handling in b2i_dss and b2i_rsa