Retired Gen. David Petraeus continues to work with the Obama White House despite his conviction on leaking classified information.

According to the White House Josh Earnest, Petraeus is still consulting the administration on Iraq and the fight against ISIS.

Petraeus, 62, admitted having an affair with his biographer Paula Broadwell when he resigned as CIA director in November 2012. Both have publicly apologized and said their romantic relationship began only after he had retired from the military.

Broadwell's admiring biography of him, "All In: The Education of General David Petraeus," came out in 2012, before the affair was exposed.

Prosecutors said that while Broadwell was writing her book in Washington in 2011, Petraeus gave her eight binders of classified material he had improperly kept from his time as the top military commander in Afghanistan. Days later, he took the binders back to his house.

Prosecutors said that after resigning from the CIA, Petraeus signed a form falsely attesting he had no classified material. He also lied to FBI agents in denying he supplied the information to Broadwell, according to court documents. He resigned as director of the CIA in November 2012.

Petraeus presided over the "surge" of American forces in Iraq and a plan to pay Sunni militias to fight al-Qaida in Iraq.

Petraeus was then promoted to commander of U.S. Central Command, which has authority over the Middle East. When Gen. Stanley McChrystal was fired in 2010 by Obama as commander in Afghanistan after his staff made impolitic remarks to a Rolling Stone reporter, Petraeus was brought in to replace him.

Since his resignation as CIA director, Petraeus has slowly taken steps to re-enter public life, going on the speaking circuit, becoming a scholar at Harvard's Kennedy School of Government, and taking a position at a private equity firm.