Fix showing up wrong error message

Fixed message saying "Certificate name is mandatory" when the generator was cancelled and certname was empty.