Afghan war 'probably illegal, certainly immoral'