(do_generate_keypair): Don't continue after an error;