Valid check for ssl