Correction: You can't trademark if the mark is already used "IN TRADE".
The foundation is a non-profit organization providing free certificates under that name. That is not "TRADE" (i.e. business, i.e. involving exchange of money for value).
However, by the same token, the seemingly slimy corporation seeking the trademark should be hard pressed to stop the non-profit's use of the mark for a free service, since that is not competing TRADE since it is not TRADE.
Besides, if it ever came to a case where they tried to prove that the non-profit was causing confusion about Comodo's trademark, it should be easy at that point to argue in court that the non-profit was openly and widely using the mark for their activity prior to Comodo's use of the mark in the conduct of trade. Therefore it was in fact Comodo that caused whatever confusion may have arisen among Comodo's potential customer base. Case dismissed.
Warning: IANAL and tend to hope naively that natural justice will prevail in the justice system, despite all evidence to the contrary.