Fix tls verify script compatibility with python3