russdill / juniper-vpn-py

Python Juniper VPN Authenticator
GNU Lesser General Public License v2.1
103 stars 80 forks source link

Python module #3

Open volga629 opened 9 years ago

volga629 commented 9 years ago

Hello Everyone, When trying to run get this issue. Any help thank you.

[root@testvm ~]# python --version
Python 2.7.5
junos_connect.py --host vpn.myhost.com --user joeuser --stdin DSID=%DSID% openconnect --juniper %HOST% --cookie-on-stdin
Traceback (most recent call last):
  File "/bin/junos_connect.py", line 20, in <module>
    import tncc
  File "/usr/bin/tncc.py", line 14, in <module>
    ssl._create_default_https_context = ssl._create_unverified_context
AttributeError: 'module' object has no attribute '_create_unverified_context'
itrend commented 9 years ago

I had the same problem. It appears tncc works with python 2.7.9 or above only, I couldn't find any workaround apart from updating Python.

snowzach commented 9 years ago

Just comment that line out. It's a hack for something or another that you don't need. ssl._create_default_https_context = ssl._create_unverified_context