Fix minor issues
- landscape.io complained - obsolete imports - ciphers -> self.ciphers
This commit is contained in:
parent
2cf2188bc3
commit
810e50a040
|
@ -5,7 +5,6 @@ import time
|
||||||
import random
|
import random
|
||||||
import sys
|
import sys
|
||||||
from time import strftime, localtime
|
from time import strftime, localtime
|
||||||
import shared
|
|
||||||
import state
|
import state
|
||||||
|
|
||||||
def createDefaultKnownNodes(appdata):
|
def createDefaultKnownNodes(appdata):
|
||||||
|
|
|
@ -5,6 +5,7 @@ SSL/TLS negotiation.
|
||||||
import asyncore
|
import asyncore
|
||||||
import socket
|
import socket
|
||||||
import ssl
|
import ssl
|
||||||
|
import sys
|
||||||
|
|
||||||
import protocol
|
import protocol
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ class TLSHandshake(asyncore.dispatcher):
|
||||||
# socket.
|
# socket.
|
||||||
if sys.version_info >= (2,7,9):
|
if sys.version_info >= (2,7,9):
|
||||||
context = ssl.create_default_context(purpose = ssl.Purpose.SERVER_AUTH if self.server_side else ssl.Purpose.CLIENT_AUTH)
|
context = ssl.create_default_context(purpose = ssl.Purpose.SERVER_AUTH if self.server_side else ssl.Purpose.CLIENT_AUTH)
|
||||||
context.set_ciphers(ciphers)
|
context.set_ciphers(self.ciphers)
|
||||||
# context.set_ecdh_curve("secp256k1")
|
# context.set_ecdh_curve("secp256k1")
|
||||||
context.check_hostname = False
|
context.check_hostname = False
|
||||||
context.verify_mode = ssl.CERT_NONE
|
context.verify_mode = ssl.CERT_NONE
|
||||||
|
|
|
@ -8,7 +8,6 @@ useVeryEasyProofOfWorkForTesting = False # If you set this to True while on the
|
||||||
|
|
||||||
|
|
||||||
# Libraries.
|
# Libraries.
|
||||||
import collections
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
import Queue
|
import Queue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user