How to mask SSAO?

My model has a material with a fresnel effect, now I want to mask the SSAO by the fresnel. So the SSAO doesn’t make the fresnel look dirty and dark where it shouldn’t. Is there any way to do this?