Proper certificate validation