python TLS outdated on xbee gateway

I tried to publish MQTT files directly from the xbee gateway using the PAHO micropython
https://github.com/digidotcom/python-mqtt/tree/master/paho/mqtt

def publish(clientId, topic, msg, hostname=“192.168.4.1”):
c = mqtt.Client(client_id=clientId)
c.tls_set(ca_certs=“certs/TeamViewerAuthority.crt”, certfile=“certs/clie
context = ssl.create_default_context()
c.tls_set_context(context)
c.tls_insecure_set(True)
print(” MQTT {0}…".format(hostname)),
c.connect(hostname, port=18884)
c.publish(topic, payload=msg)
print(“Published”)
c.disconnect()

But the result I got was:

“Exception: Python 2.7.9 and 3.2 are the minimum supported versions for TLS.”

As long as I know, python on the xbee gateway is 2.7.1 and cannot be updated. Any ideas how to go around this?

Try using the TLS Lite functions of Python 2.7.

https://www.digi.com/resources/documentation/digidocs/90001537/default.htm#references/r_tlslite.htm?TocPath=TLS%252FSSL%257C_____1

I took a look, but there is no TLS 1.2, just TLS 1.1, and Teamviewer IoT just accepts 1.2 since October 20. I am going around with Node Red on a Raspberry Pi, but not ideal.