# Importing ssl on Connectport X2 in python

**URL:** <https://forums.digi.com/t/importing-ssl-on-connectport-x2-in-python/15754>\
**Category:** Python\
**Tags:** ssl, digi, python, x2, connectport\
**Created:** [November 11, 2015, 11:42am UTC](https://forums.digi.com/t/importing-ssl-on-connectport-x2-in-python/15754 "2015-11-11T11:42:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![harkhair](https://avatars.discourse-cdn.com/v4/letter/h/dfb087/32.png) [@harkhair](https://forums.digi.com/u/harkhair)\
**Post date:** [November 11, 2015, 11:42am UTC](https://forums.digi.com/t/importing-ssl-on-connectport-x2-in-python/15754/1 "2015-11-11T11:42:52Z")

</div>

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:

[https://pypi.python.org/pypi/ssl](https://pypi.python.org/pypi/ssl)

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.

Thanks,  
Nick
