Home/Support/Support Forum/Importing ssl on Connectport X2 in python
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Importing ssl on Connectport X2 in python

0 votes
Hi all,

I need to send data from a Connectport X2 using urllib and for this application have to use the following function call from ssl:

context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)

Since the ssl module is not in the Lib directory that comes with Digi ESP, I get the following when I try to import ssl:

ImportError: No module named ssl.

I know that the module must be added to python.zip and I downloaded the module here:


I've never installed python modules so I was confused at this point. Do I just use the __init__.py file and rename it ssl.py? The file imports from _ssl2 which is a c file that it doesn't seem to be able to import. I was reading that OpenSSL is required for ssl so do I need to import modules from that as well?

I appreciate any help possible.

asked Nov 11, 2015 in Python by harkhair New to the Community (0 points)

Please log in or register to answer this question.