Two prominent Republican senators Sunday condemned former Defense Secretary Bob Gates for including negative assessments of his former bosses' war policies in his new book.

Sen. John McCain, an Arizona Republican, said it was inappropriate for Gates to publish criticism of President Barack Obama and Vice President Joe Biden at this time.

"If I (were) giving him advice, I would have waited," McCain told CNN's "State of the Union" program.

Noting that they've had their own disagreements, McCain said he admires Gates and praised him as "one of the finest public servants."

Marco Rubio, though, offered stronger criticism of Gates.

"My preference would be that people would refrain from writing these sorts of things until the president is out of office because I think it undermines the ability to conduct foreign policy," Rubio said on CBS' "Face the Nation" show.

Rubio, however, then used Gates' criticism as a launching pad for his own withering attack on Obama's foreign policies.

"I don't think we can ignore what's in the book, and I think for many of us, it confirms our worst fears," Rubio said. And that is that this is an administration full of people that either have the wrong convictions or, in the case of former Secretary (of State Hillary) Clinton, lack the courage of her convictions. You see that, for example, the motivation in Afghanistan was primarily political."

Rubio, a Florida Republican, is a possible 2016 White House candidate. Clinton is the runaway favorite to gain the Democratic nomination if she seeks it.

Gates, a Republican and former CIA director, started as Pentagon chief in July 2006 under President George W. Bush and continued in the post under Obama. Leon Panetta replaced him as defense secretary July 1, 2011.