Browse Source

Check if _create_unverified_context is supported before using it: forgotten file

master
Krzysztof Kwiatkowski 8 years ago
parent
commit
f7b5db4b52
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      juniper-vpn.py

+ 3
- 1
juniper-vpn.py View File

@@ -19,7 +19,8 @@ import hashlib
import shlex
import tncc

ssl._create_default_https_context = ssl._create_unverified_context
if hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context

"""
OATH code from https://github.com/bdauvergne/python-oath
@@ -283,3 +284,4 @@ if __name__ == "__main__":
jvpn = juniper_vpn(args)
jvpn.run()



Loading…
Cancel
Save