Toast: 

Its not clear that it was legal.

Comey typed the notes on an FBI laptop while he was a government employee, and they contained details of highly confidential government discussions.  Those notes were not Comey's property, they belonged to the US government.

As rhockin noted in his comment, the concept of executive privilege and the public knowledge of the contents would have to be examined to determine whether those notes were classified or not.

Think about it this way: suppose you worked for a company and took notes of private and confidential discussions you had with the CEO, and typed them on a company owned laptop.  You could be held legally liable if you took those notes home and then leaked them to a news organization.  Hard to see how Comey can't be held liable.