Strange ssl certificate checking issue