Fix minor issues

- landscape.io complained
- obsolete imports
- ciphers -> self.ciphers
This commit is contained in:
Peter Šurda 2017-01-12 07:26:04 +01:00
parent 2cf2188bc3
commit 810e50a040
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87
3 changed files with 2 additions and 3 deletions

View File

@ -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):

View File

@ -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

View File

@ -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