After the end of the First Gulf War some people said that Norman Schwarzkopf who had retired from army after the war would enter politics, how much could he achive if he did, is it somehow possible for him to become president?
Though he did endorse Bush rather publicly...and he did get into a bit of trouble for lending his name and visage to a GOTV campaign in Florida in 2000... (Of course, he didn't break any laws as he was retired.)
Endorsing someone is not going into politics. And since he was retired he did NOT get into any trouble at all. Everyone has a RIGHT to publicly endorse whomever they want, if you didn't know.