Sfoglia il codice sorgente

Check if _create_unverified_context is supported before using it: forgotten file

master
Krzysztof Kwiatkowski 8 anni fa
parent
commit
f7b5db4b52
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. +3
    -1
      juniper-vpn.py

+ 3
- 1
juniper-vpn.py Vedi 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()



Caricamento…
Annulla
Salva