Simplify the SSL check logic