def _pyhastls():
    """Returns true iff Python has TLS support, false otherwise."""
    try:
        import ssl
        getattr(ssl, 'HAS_TLS', False)
        return True
    except ImportError:
        return False
