Simplify error path of DH_check_pub_key()