So if McCain says that fighting the press leads to tyranny, why then was a silent all those years with Obama?
After eight years in office, what media legacy is Barack Obama leaving behind, and what might it mean for journalists in Trump's America?
When Obama first took office in 2008, he promised the media unprecedented openness in government - music to the ears of those coming out of the Bush years. However, with a crackdown on whistle-blowers, leakers and journalists, plus the justice department spearheading more prosecutions under the Espionage Act - a law passed 100 years ago - than all previous US administrations combined, has Obama been let off lightly?
"It's really been a tremendous disappointment. The Obama administration started out really strong and he said all the right things about the Freedom of Information Act [FOIA] and transparency and government openness, but in the end, eight years later, we've seen a huge number of FOIA requests that have been unanswered, an incredible number of prosecutions of leakers under the Espionage Act and there's been a tremendous amount of pressure on the journalists as a result," says Lynn Oberlander, general counsel of media operations at First Look Media.
New York Times reporter James Risen was subjected to seven years of subpoenas, responses, appeals - one that went all the way to the Supreme Court - for refusing to reveal the source who provided him with details about a botched US operation to disrupt Iran's nuclear programme for his book, State of War.
Risen refused to testify and was threatened with the "invalidity" of his reporter's privilege in that particular scenario. Reporter's privilege derives directly from the First Amendment of the US Constitution and outlines a "reporter's protection under law, from being compelled to testify about confidential information or sources". In Risen's case, this protection was fundamentally challenged.
"It set a very bad precedent. It means that there's no legal right, at least in the whole region where the Pentagon and the CIA and the NSA are, for reporters caught up in leak investigations to refuse to testify," says Risen.
Contributors: Lynn Oberlander, general counsel, media operations, First Look Media; Lucy Dalglish, dean, College of Journalism, University of Maryland; David Zurawik, media critic, The Baltimore Sun; James Risen, investigative reporter, The New York Times.