Allow him to make a Public Interest Defence, with an agreement to pardon or provide clemency. Presuming he can get a fair trial and they don't just Shwartzman him, with a fair opportunity in a public interest defense case which he has clear high ground on. Under such circumstances he can prove in court that the whistleblower system is broken, which it is, and that evan the legal programs have been hedged in such a way as to make them effectively illegal. Ultimately every action was defensible and necessary for public interest and in defence of our constitution from rogue government programs and agencies who have routinely lied to the public and congress, under oath in open and closed hearings. In reality, if we didn't live in a technocratic dictatorship the director of the NSA should be jailed for multiple counts of perjury and contempt of congress.