He won Ottoman confidence as a junior officer in the Crimean War