Technically, the president is the ultimate classification authority, so it is actually not illegal for him to divulge classified information, ie making it unclassified through release. IIRC either Lowell wood (neat guy actually) or Teller once got in trouble for discussing something, and then it blew over because either the SecEng or president had already discussed it, making it de facto unclassified.
However, administration officials that are classifying authorities (ie not cabinet positions) or officials who aren't the authority for that information (eg SecDef releasing DOE stuff) releasing information IS illegal, so in this case, since the SecDef and DNI both have said, effectively, WTFO?!, it's either illegal, or the president okay'd it.