I understand your frustration. I conveniently got Crohn's after getting my MBA, yet I refuse to let it interfere with my career goals. But I am always late in the morning.
For the last three years at two different jobs, my bosses have made appalling comments about "my condition" in addition to threats to put my on probation for my tardiness. They can't get past it, and I kind of understand, because being late makes you look like you don't care about your job. Despite my above-average performance and ability, I still can't get there on time. And bosses need reliable people, and they need them there when they need them.
So I have a letter from my Dr. on file with HR that lists brief details of Crohn's and my need for flexibility as flare ups are unpredictable, and often exacerbated with stress. In the note, my Dr. stressed the term "gainfully employed."
I try not to fall back on having Crohn's because I don't feel it is anyone's business. And after enough conversations with my angry bosses, it seems their frustration eases if I open up a little about what it feels like to have this disease - how I drag myself out of bed in the morning to lay in the shower, bringing in my breakfast to try to multi-task. And what it feels like to be in a 6-hour meeting and how it feels to have to interrupt them with my constant bathroom breaks.
The point I am trying to make is be honest and sincere with your boss about your condition. Tell him his comment made you feel bad, and understand you might be a little sensitive. And tell him Crohn’s sucks, but you love your job and you will fight your disease to make a positive impact on the company and grow the skills you can offer. You deserve the certification, and if you don't get it, well, as the HR Director, he should be familiar with the term "workplace discrimination." You can even casually mention that during your heart-to-heart with him.
These are learnings from my workplace experiences. And I wish you all the luck with getting the same rights as your peers. Don't let this make you cry at your computer. And if it ever happens again, stand up firmly for yourself and fall back on Equal Employment Rights, knowing you could put a company out of business for not playing by the rules.
Good luck!