A high court in South Africa has raised the possibility of President Jacob Zuma facing corruption charges while in office.