Hilchos Lashon Hara chapter 9, section 2
All this is when he does not praise him in public. But praising him in public is forbidden in any form, because everywhere there are jealous people, and they will come to speak against him.
But if he wants to praise a person who is widely known as a tzaddik (righteous) and an honest person, he may praise him even in front of someone who dislikes or envies him, because they will not be able to speak against him. And if they do speak against him, everyone will know that they are saying empty words.